Docker MEAN stack - Angular 6 Angular Material CosmoDB
This project was generated with Angular CLI version 6.0.8.
package.json file under project folder define the list of available scrip command Use "npm start" to run after update all environment variables under
- server/env/azure.js or server/env/local.js
- .env at project folder. Require envrionment variables are DEBUG_DEVELOPMENT_PORT (default to 4200) and NODE_ENV (default to 'development_azure' to use Azure cosmodb)
During development, there might be a need to run express server and angular separately to isolate development features. We can do that by:
- Set api_host in file 'src/environments/environment.ts' to localhost:<express_port>. The default port is 3000
- To run express server separately, use "node .\bin\www.js'. Note that this will serve the last built angular code from dist folder
- To run angular separately, use 'ng serve'
To use Azure cosmo db instead of local mongodb, set NODE_ENV to'development_azure'. Leaving this environment variable empty will set to use local mongodb
Use "openssl rand -based64 32" to generate 32 characters random string
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.
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 build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
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.