Configuration
Configure Nesula for different environments
Nesula has default configuraiton files for three environments:
Development
Staging
Production
When deployment scripts are run the file for that environment replaces the file Angular or NestJS applications use.
Do not update the environment.ts & .env files directly as are there are overwritten every deployment. Instead update the file for that environment
Environment Configuration Files
File Nesula uses
environment.ts
.env
Development
environment.dev.ts
.env.dev
Staging
environment.stage.ts
.env.stage
Production
environment.prod.ts
.env.prod
Node Process Environment
Values from the NestJS .env file are loaded in the node run time e.g. NODE_ENV
They are available in NestJS as:
Configuration Service
Nesula provides configuration services to access environment data for both Angular & NestJS.
NestJS
Environment configuration service is available in NestJS as follows:
The .env files are loaded into the config module in app.module.ts from file:
With the application this config may be access by:
Angular
Environment configuration is available directly from the environment file:
Last updated
Was this helpful?