Quiz app is deployed and live at https://nayan-quiz-app.netlify.app
This guide will walk you through setting up and running the Quiz App API locally on your machine.
Before running the project, ensure you have the following installed:
- Node.js (version 16 or higher)
- npm (comes with Node.js)
You can check if you have Node.js and npm installed by running the following commands:
node -v
npm -v
- Clone the repository
git clone https://github.com/NayanCod/Quiz-App.git
- Navigate to the Project Directory
cd quiz-app
- Install Dependencies
npm install
If you encounter any errors during the installation, use the following command to install the dependencies with legacy peer dependencies:
npm install --legacy-peer-deps
- Start the Development Server
npm run dev
This will launch the project locally at http://localhost:3000
If you prefer to run the Quiz App within a Docker container, follow the instructions below.
Ensure Docker is installed on your machine. You can verify this by running:
docker -v
Clone the Respository
git clone https://github.com/NayanCod/Quiz-App.git
Navigate to the Project Directory
cd quiz-app
Build the Docker image by running:
docker build -t quiz-app .
Start the container from the built image:
docker run -p 3000:3000 quiz-app
The app should now be running inside a Docker container and accessible at http://localhost:3000.
If 3000 is already allocated then use other port like 3001