I’m in the middle of a systems design class, and we’re supposed to get our own VPS up and running. For quick background, I found a PERN app on GitHub, and cloned that onto my digitalocean droplet, and have it connected to my domain and nginx. I have the dist directory for the production build, copied it in the backend folder, and I see my app on my domain path. I’m getting an issue with an index#####.js file that’s causing a cors error for localhost:4000, which is confusing since I have a reverse proxy for that port on my domains nginx conf. I did some digging and found a (very long) line of code that goes through the http methods and they each have a "localhost:4000/" for what route to go to for each method. I tried changing these to just / for each and it got rid of the cors error but now I’m getting an error with the promise failing. Do I need to add my domain to those paths? Or am I missing something else here?

No comments yet!

React

!react@programming.dev

Create post

A community for discussing anything related to the React UI framework and it’s ecosystem.

https://react.dev/

Wormhole

!pico8@programming.dev

Icon base by Skoll under CC BY 3.0 with modifications to add a gradient

Community stats

  • 20

    Monthly active users

  • 48

    Posts

  • 23

    Comments