Skip to content

Environment Variables

Dox allows you to access the environment variables from .env using Env class.

Env.get('APP_KEY');

// With default values
Env.get('APP_KEY', 'default_value');

With type

Env.get<int>('APP_PORT', 3000)
Env.get<String>('APP_KEY')