/.env
/app/config/
/app/app.ts
process.env
and project .env
file and parses them according to a schema. .env
file is to introduce environment specific variables that may change between deployments and store sensitive data such as api keys..env
file to a public repository. Your schema should inform the application of any defaults, but if you really need to provide a sample .env
file, name it .env.example
and be certain to remove all sensitive information./app/schemas/env-schema.ts
file to change default values and validation logic. You can read more about how to define a schema in the Validation section./app/config
path such as /app/config/foo-config.ts
make:config
command in your CLI to scaffold a new configuration quickly, however to demonstrate the flow, we've included an example of how to create one manually./app/contracts/config.ts
/app/config/foo-config.ts
/app/providers/config-provider.ts
init
hook which you can find in /app/hooks/init/app.ts
Hook
, the primary configuration options are set in the root /app/app.ts
file.