This is a simple quiz application built using the MERN (MongoDB, Express.js, React.js, Node.js) stack. The application tests users' knowledge on Node.js concepts through a set of multiple-choice questions.
Before running this application, ensure you have the following installed on your local machine:
- Node.js: Download and install Node.js
- MongoDB: Download and install MongoDB
- Clone the repository:
git clone https://github.com/Soura700/Quiz.git
- Install dependencies for both the server and client:
cd backend && npm install
cd frontend && npm install
-
Set up environment variables:
-
Create a
.env
file in theserver
directory. -
Define the following environment variables in the
.env
file:PORT=8080 MONGODB_URI=mongodb://localhost:27017/nodejs-quiz (Example)
-
- Start the MongoDB server:
mongod
- Start the Node.js server:
cd backend && nodemon server.js
- Start the React.js client:
cd frontend && npm start
- Open your web browser and navigate to
http://localhost:3000
to access the quiz application.