npm install && npm start
- Setup .env in the root
- Add MONGO_URI,JWT_SECRET and JWT_LIFETIME to the .env with correct values
- auth.js
- jobs.js
- Validate - name, email, password - with Mongoose
- Hash Password (with bcryptjs)
- Save User
- Generate Token
- Send Response with Token
- Validate - email, password - in controller
- If email or password is missing, throw BadRequestError
- Find User
- Compare Passwords
- If no user or password does not match, throw UnauthenticatedError
- If correct, generate Token
- Send Response with Token
- helmet
- cors
- xss-clean
- express-rate-limit