This is a simple web application for generating question papers based on specified criteria.
- Clone the repository
- Install dependencies:
npm install
- Run the server:
npm start
- GET
/questions
: Get all questions - POST
/questions
: Add a new question- Example body:
{ "question": "What is the speed of light", "subject": "Physics", "topic": "Waves", "difficulty": "Easy", "marks": 5 }
- Example body:
- POST
/generate-paper
: Generate a question paper- Example body:
{ "totalMarks": 100, "difficultyDistribution": { "Easy": 20, "Medium": 50, "Hard": 30 } }
- Example body:
Adjust the difficulty distribution percentages in config.json
.
app.js
: Main application filequestions.js
: File storage and handling for questionsconfig.json
: Configuration filequestions.json
: File containing sample questionsREADME.md
: Documentation