This is a Node.js-based RESTful API for Quiz APP. It uses the Express framework and PostgreSQL for data storage.
You can find the database schema from here.
- Clone the repository:
git clone https://github.com/ysntrkc/quiz-app-backend.git
- Install dependencies:
npm install
- Create database:
npx sequelize-cli db:create
npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
- Create .env file in the root directory and add the following:
PORT=5000
NODE_ENV=development
SESSION_SECRET={{your-session-secret}}
SESSION_LIFETIME={{session-lifetime-in-milliseconds}}
DATABASE_NAME=quiz-app
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=postgres
DATABASE_HOST=127.0.0.1
DATABASE_DIALECT=postgres
- Run the server:
npm start
You can see endpoints by running the server and going to http://localhost:5000/api-docs/
.