You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The best programmers don't write code, they copy it" - Senior SWE Sai Vipin Siripurapu, August 2022
Businesses that partner with FPH make donations to Food banks in the area. FPH wants us to track these businesses in our database.
Task
Review the bootcamp 3 member backend as the backend routes for Cell Dogs (a team led by the goat Madhu Sharma last year)
Use the cd command to get to the directory of your fph-backend repo
Run git checkout dev and then git pull
Make a branch off of the dev branch in the fph-backend and name it the same as the issue name. Use the command git checkout -b <insert_branch_name>
Inside the fph-backend repo, there already is a file setup called businessRouter.js under the routes directory. Uncomment the lines in this file before writing your code.
Uncomment the code where businessRouter is called in app.js. This is so that the router you set up in businessRouter.js can be utilized.
Run the code by running yarn (to install), yarn format (to format the code), yarn start (to start the program)
You should be able to access localhost:3001/business
Now create the POST, PUT, and DELETE routes for the business table. NOTE: for the put and delete routes should look like business/:businessId to make sure we are using the PUT and DELETE routes by the business id
Once you finish, make sure to run yarn format and then commit and make a PR using the slack bot /pr command.
Notes
If you do not have Postman installed, you can find a download here
Parameters should be in the Body section, data under raw. Ensure attribute names match the pgAdmin table, use quotations for String values.
Overview
"The best programmers don't write code, they copy it" - Senior SWE Sai Vipin Siripurapu, August 2022
Businesses that partner with FPH make donations to Food banks in the area. FPH wants us to track these businesses in our database.
Task
cd
command to get to the directory of yourfph-backend
repogit checkout dev
and thengit pull
dev
branch in thefph-backend
and name it the same as the issue name. Use the commandgit checkout -b <insert_branch_name>
fph-backend
repo, there already is a file setup calledbusinessRouter.js
under theroutes
directory. Uncomment the lines in this file before writing your code.businessRouter
is called inapp.js
. This is so that the router you set up inbusinessRouter.js
can be utilized.yarn
(to install),yarn format
(to format the code),yarn start
(to start the program)localhost:3001/business
POST
,PUT
, andDELETE
routes for the business table.NOTE: for the put and delete routes should look like business/:businessId to make sure we are using the PUT and DELETE routes by the business id
yarn format
and then commit and make a PR using the slack bot/pr
command.Notes
Support
As always, feel free to PM Madhu and Josh on Slack/Messenger for support.
The text was updated successfully, but these errors were encountered: