This source code is part of Angular 7 Tutorial: Building CRUD Web Application tutorial.
This project was generated with Angular CLI version 7.0.1.
Start the mongodb database with the following command:
mongod
(assuming mongodb is install on this machine and the data directory is in the user directory)
Verify that MongoDB has started successfully by checking the process output for the following line:
[initandlisten] waiting for connections on port 27017
Start the API:
cd ../NodeRestApi
npm start
This project is cloned from: https://github.com/didinj/NodeRestApi.git
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.
On the aws server, run nohup mongod & and then nohup npm start & for the NodeRestApi and then ng build . for the Angular app (the production build doesn't work) and then run the npm http-server (npm install -g http-server) in the dist/angular...etc build directory with the command nohup http-server & to get it up and running.
The api.service.ts file was also changed so that the api IP was that of the AWS server, rather than localhost just to get it working.
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.