Skip to content

natanduartedev/studymate-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Study Mate - Backend

Backend API for Final Year Practical Project.

Running locally

peerjs --port 9000 --key peerjs --path /studymate

  • install dependencies:
yarn install
  • rename the file config.example.json (path: ./api/config) to config.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

Testing

You can test the endpoints using both postman collection and environment provided here (the postman folder).

⚠️ Dropping the database 💀

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published