Knex npm i -g knex Morgan npm i -g morgan Helmet npm i -g helmet CORS npm i -g cors Postgres brew install postgres Express npm i -g express sqlIte3 brew install sqlite3 JSONWEBTOKEN npm i -g jsonwebtoken bcryptjs npm i -g bcryptjs
jest npm i -g jest nodemon npm i -g nodemon supertest npm i -g supertest eslint npm i -g eslint
heroku login heroku apps:create heroku addons:create heroku logs --tail -a <app_name> heroku run --app <app_name>
http://localhost:5500 in development
http://localhost:5500/api/auth/register
http://localhost:5500/api/auth/login
Users
[POST] https://sauti-market-bw.herokuapp.com/api/auth/register
returns user object
[POST] https://sauti-market-bw.herokuapp.com/api/auth/login
returns token, user object
Items
[GET] ALL ITEMS: https://sauti-market-bw.herokuapp.com/api/items
returns array of all item objects
[GET] ITEMS BY ID: https://sauti-market-bw.herokuapp.com/api/items/:id
returns item object with matching id
[POST] ITEM NEW ITEM: https://sauti-market-bw.herokuapp.com/api/items
returns item object
[PUT] UPDATE ITEM: https://sauti-market-bw.herokuapp.com/api/items/:id
returns item object
[DELETE]DELETE ITEM: https://sauti-market-bw.herokuapp.com/api/items/:id
returns delete message
Users
[POST] https://team-amazing.herokuapp.com/api/auth/register
returns user object
[POST] https://team-amazing.herokuapp.com/api/auth/login
returns token, user object
Items
[GET] ALL ITEMS: https://team-amazing.herokuapp.com/api/items
returns array of all item objects
[GET] ITEMS BY ID: https://team-amazing.herokuapp.com/api/items/:id
returns item object with matching id
[POST] ITEM NEW ITEM: https://team-amazing.herokuapp.com/api/items
returns item object
[PUT] UPDATE ITEM: https://team-amazing.herokuapp.com/api/items/:id
returns item object
[DELETE]DELETE ITEM: https://team-amazing.herokuapp.com/api/items/:id
returns delete message
MY-LIST Endpoints
[POST]: /api/auth/register
[POST]: /api/auth/login
/api/items/
User Object { id: integer username: string password: string email: string isOwner: boolean } Item Object { id: integer item_name: string location: string quantity: integer price: float description: string user_id: integer // this references the id in the user table }