/quiz-server

quiz-server is the official JLUG's backend of quiz server which is designed to test aptitude and various other questions

Primary LanguageJavaScript

Quiz Server

to run the server

npm install

nodemon index.js

create .env file and assign values of

PORT=5000
DATABASE_URL="your mongodb url"
ACCESS_TOKEN_SECRET="any combination of numbers letter"
REFRESH_TOKEN_SECRET="any combination of numbers letter "

Authentication routes

To test authentication routes

go to postman/thunder Client

For login

POST http://localhost:8000/api/v1/auth/login

login should be in this format

{
  "email":"your username"
  "password":"your password"

}

TO register

POST http://localhost:8000/api/v1/auth/register

{
  "name":"your name"
  "email":"your email"
  "password":"your password"
  "branch":"your branch"
  "domain":"your domain"

  
}

To post technical questions

Questions are in technical.js [edit the question to upload them]

POST http://localhost:8000/api/v1/question/technical

To view and delete

GET http://localhost:8000/api/v1/question/technical

DELETE http://localhost:8000/api/v1/question/technical

To post management questions

Questions are in management.js[edit the question to upload them]

POST http://localhost:8000/api/v1/question/management

To view and delete

GET http://localhost:8000/api/v1/question/management

DELETE http://localhost:8000/api/v1/question/management

To post aptitude questions

Questions are in aptitude.js [edit the question to upload them]

POST http://localhost:8000/api/v1/question/aptitude

To view and delete

GET http://localhost:8000/api/v1/question/aptitude

DELETE http://localhost:8000/api/v1/question/aptitude

To post general_awareness questions

Questions are in general_awareness.js [edit the question to upload them]

POST http://localhost:8000/api/v1/question/general

To view and delete

GET http://localhost:8000/api/v1/question/general

DELETE http://localhost:8000/api/v1/question/general

To post sports questions

Questions are in sports.js [edit the question to upload them]

POST http://localhost:8000/api/v1/question/sports

To view and delete

GET http://localhost:8000/api/v1/question/sports

DELETE http://localhost:8000/api/v1/question/sports