Backend API for Final Year Practical Project.
peerjs --port 9000 --key peerjs --path /studymate
- install dependencies:
yarn install
-
rename the file
config.example.json
(path: ./api/config) toconfig.json
and set your database credentials as well. -
create a .env file in the root directory with:
PORT=3000 # your application port
DEV_SECRET=some_really_difficult_secret_for_token_authentication
- then create the database and migrate:
npx sequelize db:create
npx sequelize db:migrate
- run dev environment
yarn dev
You can test the endpoints using both postman collection and
environment provided here (the postman
folder).
In case you need to drop the database to fix some issue on the tables, run the following commands:
npx sequelize db:drop
npx sequelize db:create
npx sequelize db:migrate