This project was generated with Node, Nodemon, Express, and MongoDB for the backend.
Angular is used for the front-end UI Components. Node and Express comprise the backend, and the database is served with MongoDB. Other packages include bcrypt.js, cors, jsonwebtoken, express-validator, and mongoose.
Tools Used:
In this project I learned how to create Rest API back-end server that validates users using JWT web tokens. The back-end uses a MVC design pattern, and I learned to implement middlewares in the main index.js.
In addition to operations dealing with Users, I included CRUD operations for Events, which are handlded through the interfaces in the front end. Each User is defined with an array of Events, for which they may be able add, update, delete, or get events.
- POST Login -> localhost:4000/api/auth
- POST Register -> localhost:4000/api/auth/new
- GET RenewToken-> localhost:4000/api/auth/renew
- GET All Events -> localhost:4000/api/events
- GET All Events by User's Email -> localhost:4000/api/events/user-events
- POST Add Event -> localhost:4000/api/events/add
- POST Delete Event -> localhost:4000/api/events/delete
- POST Update Event -> localhost:4000/api/events/update
- GET All Maps -> localhost:4000/api/maps
- GET All Maps by User's Email -> localhost:4000/api/maps/user-maps
- POST Add Map -> localhost:4000/api/maps/add
- POST Delete Map -> localhost:4000/api/maps/delete
Clone the repo, then
Or with nodemon (recommended)
You will need bcryptsjs, cors, dotenv, express, express-validator,jsonwebtoken, and mongoose. Official installation guide: https://docs.mongodb.com/manual/installation/. Then:
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application 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.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.