From 7584d2d7a7110aef0331ebfa178b2295842c59fa Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:19:14 -0700 Subject: refactor: project maintenance - work in progress --- start/env.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 start/env.ts (limited to 'start/env.ts') 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 @@ +/* +|-------------------------------------------------------------------------- +| 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), { + 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), +}) -- cgit v1.2.3-70-g09d2