This is Backend - REST API for a Quiz App build using TypeScript and Mongoose.
Backend playlist: Quiz App Backend
- 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.
- 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.
](/sayedazharsabri/Quiz-App-REST-API-TS-Mongoose/raw/master/backend/doc/images/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
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
](/sayedazharsabri/Quiz-App-REST-API-TS-Mongoose/raw/master/backend/doc/images/Quiz_App_REST-API.png)