software-students-fall2021 / project-setup-penguin

project-setup-penguin created by GitHub Classroom
3 stars 4 forks source link

prefix all BE routes with /api #210

Closed janethuangg closed 2 years ago

janethuangg commented 2 years ago

to deploy our FE and BE to a single DigitalOcean droplet, one approach is to forward the requests to the port where the BE is deployed. in order to do this, we need to differentiate the React route GET /deck/:id from the NodeJS route GET /deck/:id, and we'll do this by prefixing all NodeJS routes with /api.

i also prefixed all image routes with /uploads

reference: https://medium.com/front-end-weekly/deploy-fullstack-with-nginx-on-digital-ocean-ed1fbc92275f