aboutsummaryrefslogtreecommitdiffstats
path: root/start/env.ts
blob: 5b40fd8a57568e0888377e3f0a2a3dab04335042 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
|--------------------------------------------------------------------------
| 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 '@adonisjs/core/env';

export default await Env.create(new URL('../', import.meta.url), {
  NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
  PORT: Env.schema.number(),
  APP_KEY: Env.schema.string(),
  HOST: Env.schema.string({ format: 'host' }),
  LOG_LEVEL: Env.schema.string(),

  /*
  |----------------------------------------------------------
  | Variables for configuring session package
  |----------------------------------------------------------
  */
  SESSION_DRIVER: Env.schema.enum(['cookie', 'memory'] as const),

  /*
  |----------------------------------------------------------
  | Variables for configuring the mail package
  |----------------------------------------------------------
  */
  // SMTP_HOST: Env.schema.string(),
  // SMTP_PORT: Env.schema.string(),
  // SES_ACCESS_KEY: Env.schema.string(),
  // SES_ACCESS_SECRET: Env.schema.string(),
  // SES_REGION: Env.schema.string(),
  // MAILGUN_API_KEY: Env.schema.string(),
  // MAILGUN_DOMAIN: Env.schema.string(),
  // SPARKPOST_API_KEY: Env.schema.string(),
});