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.
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