jan/web/helpers/atoms/ApiServer.atom.ts
GenkaOk 089e311bfd
Add API prefix settings (#2528)
Co-authored-by: Van Pham <64197333+Van-QA@users.noreply.github.com>
2024-04-04 19:45:45 +07:00

18 lines
524 B
TypeScript

import { atomWithStorage } from 'jotai/utils'
export const hostOptions = ['127.0.0.1', '0.0.0.0']
export const apiServerPortAtom = atomWithStorage('apiServerPort', '1337')
export const apiServerHostAtom = atomWithStorage('apiServerHost', '127.0.0.1')
export const apiServerPrefix = atomWithStorage('apiServerPrefix', '/v1')
export const apiServerCorsEnabledAtom = atomWithStorage(
'apiServerCorsEnabled',
true
)
export const apiServerVerboseLogEnabledAtom = atomWithStorage(
'apiServerVerboseLogEnabled',
true
)