This is a simple Quiz App that allows users to create and take quizzes. The application has two main functionalities:
- Creating a quiz with custom questions and options.
- Taking a quiz and getting a score based on the correct answers.
- Create a quiz with multiple questions and options.
- Take a quiz and get instant feedback on your score.
- Data persistence using a JSON file to store quizzes.
- HTML
- CSS
- JavaScript
- Node.js
- Express.js
-
Clone the repository:
git clone https://github.com/Rabia2417/quiz-app.git cd quiz-app
-
Install dependencies:
npm install
-
Run the server:
node server.js
- Go to the home page.
- Click on "Create Quiz".
- Fill in the quiz name and questions.
- Submit the quiz. The quiz will be saved and available for taking.
- Go to the home page .
- Click on "Take Quiz".
- Select a quiz from the list of available quizzes.
- Answer the questions and submit the quiz to see your score.
Sets up the Express server to serve static files and handle API requests for creating and fetching quizzes.
The home page with navigation to "Create Quiz" and "Take Quiz" pages.
The page for creating a new quiz. Contains a form to input quiz questions and options.
The page for taking a quiz. Displays available quizzes and allows the user to take and submit a quiz.
JavaScript for handling the creation of quizzes. Sends new quizzes to the server.
JavaScript for fetching available quizzes from the server and handling the quiz-taking process.
A JSON file that stores the created quizzes.
Fetches all the quizzes from quizzes.json
.
Saves a new quiz to quizzes.json
.
- Ensure the server is running before accessing the pages.
- The application uses a simple JSON file for data persistence.
- Thank you to the creators of Node.js and Express.js for their amazing tools.