Environments
With environments, you can define different configurations depending on the environment type your app is currently running.
It is recommended to have 4 types of environments: development
, testing
, staging
, production
.
After app.launch
you can always access the current environment vars via app.env
.
all.ts
development.ts
testing.ts
If we launch our app.js with NODE_ENV = testing
#
Env Injectionthe env object can be injected to any class.