Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yassinekader/quiz-app-express
Quiz API, providing endpoints for classes, quizzes, responses, results, and user authentication
https://github.com/yassinekader/quiz-app-express
docker express mongodb mongoose quiz quiz-api quiz-app swagger
Last synced: 7 days ago
JSON representation
Quiz API, providing endpoints for classes, quizzes, responses, results, and user authentication
- Host: GitHub
- URL: https://github.com/yassinekader/quiz-app-express
- Owner: YassineKADER
- License: apache-2.0
- Created: 2024-01-12T11:56:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-25T13:13:57.000Z (9 months ago)
- Last Synced: 2024-04-25T14:32:38.572Z (9 months ago)
- Topics: docker, express, mongodb, mongoose, quiz, quiz-api, quiz-app, swagger
- Language: JavaScript
- Homepage: https://quiz-app.eroslabs.live/
- Size: 539 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quiz App API
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/](https://quiz-app.eroslabs.live/), and its Swagger documentation is available at [https://quiz-app.eroslabs.live/api-docs/](https://quiz-app.eroslabs.live/api-docs/).
## API Documentation
The API documentation is available at [https://quiz-app.eroslabs.live/api-docs/](https://quiz-app.eroslabs.live/api-docs/).
## Environment Variables
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
Tokens expire after 24 hours. To modify this, you can change the `generateToken` function inside `routes/users.js`.
## Running the Project
You can run the project using npm:
```bash
npm i
npm start
```Or you can use Docker. To build the Docker image, use:
```bash
docker build -t quiz-app .
```To run the Docker container, use:
```bash
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.
## UI Testing
For testing the API and its functionalities, UI has been created by [EN-NAQQACH](https://github.com/EN-NAQQACH/Quiz-App). This project is a collaboration between us, where I developed all the APIs used in the Quiz interface, and [EN-NAQQACH](https://github.com/EN-NAQQACH/Quiz-App) created the impressive interface.Additional documentation for the interface can be found in [EN-NAQQACH](https://github.com/EN-NAQQACH/Quiz-App)'s repository.
## Contributing
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.
## License
[Apache-2.0](https://choosealicense.com/licenses/apache-2.0/)