diff benchmark/bun-http-framework-benchmark/dev/adonis/env.ts @ 185:dfdd66825396

Merged in keep alive changes and mrjunejune changes.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:22:30 -0800
parents a8976a008a9d
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/benchmark/bun-http-framework-benchmark/dev/adonis/env.ts	Fri Jan 23 22:22:30 2026 -0800
@@ -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 '@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(),
+  DRIVE_DISK: Env.schema.enum(['local'] as const),
+  NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),
+})