Configuration
Configure Nesula for different environments
Nesula has default configuraiton files for three environments:
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
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.
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:
Environment configuration is available directly from the environment file: