This project was generated with Angular CLI version 7.3.6.
If you don't have node.js on your system download the stable version from this link: https://nodejs.org/en/,
Install angular-cli:
npm install -g @angular/cli
Clone the project and run npm install
on terminal while you are in the project folder
Run ng serve
for a dev server. Navigate to http://localhost:4200/
.
-Register
-Login
-Log-out
-Route protection
-Validation with real Node.js backend using MongoDB
Application is developed with one module per component approach. All modules are loaded lazily so that it improves the performance of the app. AuthGuard is implemented to the routes so that without valid JWT token, unauthorized user cannot access /details route of the app. For styling purposes angular material library is used.
Server is deployed to heroku so at first request server needs to bootup, there may be little delays because of that.
apiUrl: 'https://agile-peak-56363.herokuapp.com'
/users/register -> Register new user
/users/authenticate -> Log-in and authenticate
Node.JS backend is implemented by applying the steps at:
http://jasonwatmore.com/post/2018/06/14/nodejs-mongodb-simple-api-for-authentication-registration-and-user-management
After successfully authorize the user, jwt token is stored in local storage using key,value map. Unless it is deleted by the user with log-out function, users stays logged in