diff options
author | 2024-02-10 18:19:14 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | 7584d2d7a7110aef0331ebfa178b2295842c59fa (patch) | |
tree | 900cd71237e6231b57936fcce77ff229cd459041 /start/env.ts | |
parent | upgrade recipes submodule (diff) | |
download | ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.gz ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.tar.zst ferdium-server-7584d2d7a7110aef0331ebfa178b2295842c59fa.zip |
refactor: project maintenance
- work in progress
Diffstat (limited to 'start/env.ts')
-rw-r--r-- | start/env.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/start/env.ts b/start/env.ts new file mode 100644 index 0000000..3e1702e --- /dev/null +++ b/start/env.ts | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | |-------------------------------------------------------------------------- | ||
3 | | Validating Environment Variables | ||
4 | |-------------------------------------------------------------------------- | ||
5 | | | ||
6 | | In this file we define the rules for validating environment variables. | ||
7 | | By performing validation we ensure that your application is running in | ||
8 | | a stable environment with correct configuration values. | ||
9 | | | ||
10 | | This file is read automatically by the framework during the boot lifecycle | ||
11 | | and hence do not rename or move this file to a different location. | ||
12 | | | ||
13 | */ | ||
14 | import { Env } from '@adonisjs/core/env' | ||
15 | |||
16 | export default await Env.create(new URL('../', import.meta.url), { | ||
17 | HOST: Env.schema.string({ format: 'host' }), | ||
18 | PORT: Env.schema.number(), | ||
19 | |||
20 | APP_KEY: Env.schema.string(), | ||
21 | APP_NAME: Env.schema.string(), | ||
22 | |||
23 | NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const), | ||
24 | }) | ||