Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup_business_post_put_delete #8

Closed
ctc-devops opened this issue Nov 27, 2023 · 0 comments · Fixed by #17
Closed

setup_business_post_put_delete #8

ctc-devops opened this issue Nov 27, 2023 · 0 comments · Fixed by #17
Assignees

Comments

@ctc-devops
Copy link
Contributor

ctc-devops commented Nov 27, 2023

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

  1. Review the bootcamp 3 member backend as the backend routes for Cell Dogs (a team led by the goat Madhu Sharma last year)
  2. Use the cd command to get to the directory of your fph-backend repo
  3. Run git checkout dev and then git pull
  4. 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>
  5. 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.
  6. 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.
  7. Run the code by running yarn (to install), yarn format (to format the code), yarn start (to start the program)
  8. You should be able to access localhost:3001/business
  9. 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
  10. Once you finish, make sure to run yarn format and then commit and make a PR using the slack bot /pr command.

Notes

image

  • 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.
  • References:

Support

As always, feel free to PM Madhu and Josh on Slack/Messenger for support.

@gdavid7 gdavid7 linked a pull request Dec 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants