Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Command reference here.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
Configuration for this application can be found in the src/environments folder.
export const environment = {
production: true,
keycloakUrl: 'https://auth.domain.tld/auth',
multiTenant: true,
defaultRealm: 'XYZRealm',
baseUrl: '/',
realmRegExp: '^https?://[^/]+/([-a-z-A-Z-0-9]+)',
laapi: 'https://api.domain.tld/v1/',
aems: 'https://api.aems.domain.tld/v1/',
};There are configurations for each stage (dev, int, prod) Those configurations are available on the angular.json configuration file.
E.g:
- Targeting the app for the prod stage
{
"integration": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}The Angular application is built into Docker containers and exposed thru NGINX.
Build itself is performed
$ npm run ng build -- --configuration=${PROFILE} --output-path=distCommand reference here.
The app is deploy on AWS EKS via CI/CD Pipelines.
If you intend to build an image of the application, you simply run the following docker commands with the respective environment, profile and target image.
docker build -t ${TARGET_IMAGE_NAME}:${ENVIRONMENT} -f ./build/Dockerfile . --build-arg PROFILE=development
docker push ${TARGET_IMAGE_NAME}:${ENVIRONMENT}This app uses yarn to manage the dependencies. These are the commands you must certainly use:
yarn
yarn installyarn add [package]
yarn add [package]@[version]
yarn add [package]@[tag]yarn add [package] --dev # dev dependencies
yarn add [package] --peer # peer dependenciesyarn up [package]
yarn up [package]@[version]
yarn up [package]@[tag]yarn remove [package]