lambui / mean1

first website using mean stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1st WEBSITE USING MEAN STACK

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.

Progress:

  • 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!

How to get setup:

  1. Have NodeJs and NPM installed
  2. Have Mongodb installed
  3. Clone this github repo
  4. Run npm start from the cloned folder to get set up.
  5. Have angular-cli installed by running npm install -g angular-cli
  6. Run ng serve from sub-folder 'angular' to get angular set up.

How to run after setup:

  1. In one terminal, run npm service mongod start to start mongodb
  2. In one terminal, run npm start from cloned folder
  3. In one terminal, run ng serve from angular sub-folder
  4. Go to localhost:4200

How to build angular to production:

  1. run ng build from angular sub-folder
  2. run npm start from cloned folder
  3. Go to localhost:3000

About

first website using mean stack


Languages

Language:TypeScript 70.5%Language:JavaScript 23.0%Language:HTML 6.2%Language:CSS 0.3%