This repository will hold source codes for the back end script. Alternatively deployed to Heroku
Some notes:
- If you want to spin up the server locally,
[ ] clone this project and open it in VS Code,
[ ]
npm i
to get dependenies, [ ]npm run migrate
, [ ]npm run seed
, [ ] create a top-level .env file and add the following codePORT=5000; DB_ENV='development'; JWT_SECRET='vasjdnvaj&T&*%&*39r2309bcH8LONGassPASSWORDvasjdv79y294y^*R&9u(08y88)(';
[ ] then type in the command linenpm run server
https://better-professor-api-karim.herokuapp.com/
npm server:
spins up the server using nodemon
npm test:
runs the tests
data variable | data type |
---|---|
first_name | string |
last_name | string |
string (&& valid email format) | |
password | string |
- Make a POST request to
/api/auth/register
- Required fields in the
req.body
:
first_name
last_name
email
password
- Make a POST request to
/api/auth/login
- Required fields in the
req.body
:
email
password