Code done by me following this series: MEAN Stack front to back
Note: there are some differences from the tutorial code due to my personal style and me fixing some bugs.
- Basic backend with ExpressJs and NodeJs
- Connect to database using Mongodb and mongoose
- User registration
- Authentication with json web token (jwt)
- Initialize Angular with Angular-cli
- Basic app-routing.module
- Complete Register component with input validation
- Register component sends POST request to backend to register user into database
- Complete Login component
- Login component sends POST request to backend to retrieve and store auth token
- Complete Authorization using jwt
- Implement AuthGuard with jwt authorization
- Finish and successfully build to production!
- Have NodeJs and NPM installed
- Have Mongodb installed
- Clone this github repo
- Run
npm start
from the cloned folder to get set up. - Have angular-cli installed by running
npm install -g angular-cli
- Run
ng serve
from sub-folder 'angular' to get angular set up.
- In one terminal, run
npm service mongod start
to start mongodb - In one terminal, run
npm start
from cloned folder - In one terminal, run
ng serve
from angular sub-folder - Go to localhost:4200
- run
ng build
from angular sub-folder - run
npm start
from cloned folder - Go to localhost:3000