Environments
Environments are used to easily change variables which are dependent on deploy location. All environments should already have setup in apps, but when new app is created it should be created manually.
AVASpace defines these environments:
- ALPHA AVAplace - development environment for partner developers
- BETA AVAplace – pre-production environment - should be used by Partners at development stage,
- AVAplace – production environment - should NOT be used to ANY development.
Partner developer can create its own environments if needed.
Create new environment
To create new environment, follow these steps:
- Create new environment file in environments folder
- Environment name:
environment.{env-name}.ts
- Environment name:
- In angular.json add:
- In configuration section
"{env-name}": {
"fileReplacements": [{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.{env-name}.ts"
}]
}
- In serve – configuration section
"{env-name} ": {
"browserTarget": "{app-name}:build:release"
}
Change environment
To change environment run:
ng serve –c={env-name}