Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 4.16 KB

File metadata and controls

37 lines (33 loc) · 4.16 KB

![applogo](Quiz_App_REST-API.png)

Quiz-App-REST-API-TS-Mongoose

This is Backend - REST API for a Quiz App build using TypeScript and Mongoose.

Backend playlist: Quiz App Backend

Dependencies:

Static Badge Static Badge Static Badge Static Badge

What you can learn by exploring

  • There is JWT authentication in this app
  • There is express validator and express error routes
  • There is custom error class.
  • There is nodemailer used in this.

How to Start ?

  • Step 1: Clone this repository.
  • Step 2: To install all the required packages run command:
    yarn install
  • Step 3: Add environment configuration details to nodemon.json for development. ![config](carbon.png)
  • Step 4: Replace <DATABASE_CONNECTION_STRING> with appropriate connection string.
  • Step 5: To apply JWT authentication, replace <ENCRYPTION_SECRET> with appropriate key.
  • Step 6: To use the emailer functionality, replace <USER_EMAIL> with an actual email and enable 2-step Verification on it.
  • Step 7: Visit manage account of the email and search for App passwords![Alt text](<Screenshot 2023-10-02 191641.png>) and create new app specific password and replace <USER_PASSWORD> with that new password.
  • Step 8: Replace <SERVICE_PROVIDER> with the service provider you wish to use and in this case smtp.gmail.com is used.
  • Step 9: Replace <SERVER_BASE_URL> with localhost:3000
  • Step 10: To execute this project on localhost run command:
    yarn start:dev