aboutsummaryrefslogtreecommitdiffstats
path: root/env.ts
diff options
context:
space:
mode:
Diffstat (limited to 'env.ts')
-rw-r--r--env.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/env.ts b/env.ts
new file mode 100644
index 0000000..1f163b0
--- /dev/null
+++ b/env.ts
@@ -0,0 +1,25 @@
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
15import Env from '@ioc:Adonis/Core/Env';
16
17export default Env.rules({
18 HOST: Env.schema.string({ format: 'host' }),
19 PORT: Env.schema.number(),
20
21 APP_KEY: Env.schema.string(),
22 APP_NAME: Env.schema.string(),
23
24 NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
25});