This is the back-end code for https://www.gigfigure.com.
This is a Node.js app made with Express, knex, pg, and other familiar node packages. It lives on Heroku at https://secret-basin-57769.herokuapp.com/ along with it's PostgreSQL database.
Tech used: JavaScript, Node.JS, PostgreSQL, Heroku, VSCode, JSON, Git.
This endpoint allows for POST requests only to register a new user. The body of the response is generated from user inputs on the front end.
This endpoint takes a POST request and returns a JWT representing the existing user. This JWT is used for authorization middleware when sent as part of protected endpoint requests.
This endpoint requires a JWT in the header under the "Authorization" key. It will return all of the contacts for the user associated with that JWT in JSON format.
This endpoint requires a JWT in the header under the "Authorization" key, and a new contact in the body of the request. It will return the new contact object in JSON format for the user associated with the JWT.
This endpoint requires a JWT in the header under the "Authorization" key. It will return the specific contact requested by the :contact_id parameter, as long as it is associated with the specific user.
This endpoint requires a JWT in the header under the "Authorization" key, and an updated contact in the body of the request. It will return the contact once updated, as long as the JWT is associated with the correct user.
This endpoint requires a JWT in the header under the "Authorization" key. It will return a success message if deletion is successful. It can only delete a contact for the correct user.
This endpoint requires a JWT in the header under the "Authorization" key. It will return all of the cases in JSON format for the user associated with the JWT.
This endpoint requires a JWT in the header under the "Authorization" key and a new case in the body of the request. It will return a success message upon the creation of the new case.