npm install && npm start
- Import connect.js
- Invoke in start()
- Setup .env in the root
- Add MONGO_URI with correct value
- auth.js // done
- jobs.js//done
Email Validation Regex
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
- Validate - name, email, password - with Mongoose//done
- Hash Password (with bcryptjs) // done
- Save User //done
- Generate Token//done
- Send Response with Token//done
- Validate - email, password - in controller done
- If email or password is missing, throw BadRequestError done
- Find User done
- Compare Passwords done
- If no user or password does not match, throw UnauthenticatedError done
- If correct, generate Token done
- Send Response with Token done
- Validation Errors && duplicate i think those two will match khlui:)//done
- Duplicate (Email)//done
- Cast Error
- helmet
- cors
- xss-clean
- express-rate-limit
Swagger UI
/jobs/{id}:
parameters:
- in: path
name: id
schema:
type: string
required: true
description: the job id