This is a charity angular app to demonstrate how to use RXJS, EventEmitters, Reusable components and other angular 2,4,5,6+ awesome modules
- Go to project folder and install dependencies:
npm install
- Run mock API server, and the API server will run on
localhost:3000
in your browser:
json-server --watch db.json
Note: Make sure you have json-server
installed globally on your matchine :)
- Launch development server, and open
localhost:4200
in your browser:
npm start
Task automation is based on NPM scripts.
Tasks | Description |
---|---|
npm start | Run development server on http://localhost:4200/ |
npm run build [-- --env=prod] | Build app for production in dist/ folder |
json-server --watch db.json | Run mock api server on localhost:3000 data can be found or edited in db.json |
When building the application, you can specify the target environment using the additional flag --env <name>
(do not
forget to prepend --
to pass arguments to npm scripts).
The default build environment is prod
.
Run npm start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change
any of the source files.
You should not use ng serve
directly, as it does not use the backend proxy configuration by default.