aboutsummaryrefslogtreecommitdiffstats
path: root/env.ts
blob: 1f163b04238f346c7e3cc19b094eb29a0b17a5f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
|--------------------------------------------------------------------------
| Validating Environment Variables
|--------------------------------------------------------------------------
|
| In this file we define the rules for validating environment variables.
| By performing validation we ensure that your application is running in
| a stable environment with correct configuration values.
|
| This file is read automatically by the framework during the boot lifecycle
| and hence do not rename or move this file to a different location.
|
*/

import Env from '@ioc:Adonis/Core/Env';

export default Env.rules({
  HOST: Env.schema.string({ format: 'host' }),
  PORT: Env.schema.number(),

  APP_KEY: Env.schema.string(),
  APP_NAME: Env.schema.string(),

  NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
});