NATOURS API PART-2

04-08-2020: ERROR HANDLING WITH EXPRESS

  • Debugging Node.js with ndb: node-debugger
  • 2 types of errors: Operational and Programming Errors
  • Global Error handling done using middlewares!
  • Customize the errors for development and production seperately!
  • Set up error handling for Async Function, Invalid Database ID's, Duplicate Name, Validation Errors,Unhandled Rejections and Uncaught Expressions!
  • 06-08-2020: AUTHENTICATION, AUTHORIZATION AND SECURITY

  • Created user model using mongodb schema!
  • Authenticated our users using JWT(JSON Web Token)
  • Managed Signing in and Logining in
  • Used BCRYPT Algo for encrypting our passwords
  • Added the password reset functionality
  • Used Nodemailer for sending emails for password reset!
  • Added JWT Cookies, Rate Limiting, Data Sanitization, Security HTTP Headers and Parameter Pollution!

  • 28-08-2020: STARTED DATA MODELLING AND LEARNING ADVANCED MONGOOSE

    NPM PACKAGES USED

  • Bcrypt
  • express-mongo-sanitize
  • express-rate-limit
  • helmet
  • hpp
  • jsonwebtoken
  • ndb
  • nodemailer
  • xss-clean
  • Checkout the Code!