A simple server combining authentication techniques, CRUD functions on a SQL database, and adaptable routing techniques.
PORT
- Port NumberDATABASE_URL
- URL to the running Postgres instance/dbSECRET
- Secret for jwt tokens
npm install
to install dependencies.npm run db:config
then edit the created config file.npm run db:create
to create the database.npm start
to start the application.
- User data routes
- POST :
/signup
- creates a new user - POST :
/signin
- verifies a user against the database - GET :
/users
- requires admin access to retrieve a list of users in the database
- POST :
api/v2
routes, including/food
and/clothes
models- GET : retrieve all items or a specified item
- POST : requires writer role to add an item
- PUT : requires editor role to edit an item
- DELETE : requires admin role to delete an item