This is the Quiz App API, which provides endpoints for managing classes, quizzes, responses, and results. The APP is hosted on https://quiz-app.eroslabs.live/, and its Swagger documentation is available at https://quiz-app.eroslabs.live/api-docs/.
The API documentation is available at https://quiz-app.eroslabs.live/api-docs/.
The application requires the following environment variables:
JWT_SECRET
: The secret key for JWT. Used for authentication.MONGO_URI
: The MongoDB connection string.NODE_ENV
: The environment in which the application is running (e.g.,development
,production
).PORT
: The port on which the application is running.
Tokens expire after 24 hours. To modify this, you can change the generateToken
function inside routes/users.js
.
You can run the project using npm:
npm i
npm start
Or you can use Docker. To build the Docker image, use:
docker build -t quiz-app .
To run the Docker container, use:
docker run -p 5000:5000 --env-file .env quiz-app
Replace 5000 with the port you want to use, and .env with your environment variables file.
For testing the API and its functionalities, UI has been created by EN-NAQQACH. This project is a collaboration between us, where I developed all the APIs used in the Quiz interface, and EN-NAQQACH created the impressive interface.
Additional documentation for the interface can be found in EN-NAQQACH's repository.
The codebase could use some organization and cleanup. It's a bit of spaghetti code at the moment, so any contributions in this area would be greatly appreciated.