Hi! I deployed my react project on digital ocean (ubuntu). In development am making fetch request to my backend server that's also hosted on the digital ocean (same O.s with frontend App). I added proxy: ip:port in the package.json file. And that is working perfectly fine, but after running npm run build the request is using domain instead of backendipadress. Suppose (real.com) is domain and ipaddress:5000 my server if make the request instead of ipaddress:5000 the request is redirecting to real.com. Am using nginx for reverse proxy
I can't vouch much but I have used NPM but not to that 'final state' and yet to explore it but I use Python and Django. It sounds like their might be a redirect in place in the settings that might be causing this? Can't be 100% sure but sounds like the same issue I had with my own cms in development currently in the urls, thats if you have a 'settings url' file, might differ for react!
I've heard the documentations quite good for Digital Ocean, so you might need to refer to the documentation :)
jarupong pajakgo
I'm a noob web developer
Why do you use Nginx then it doesn't work?
Can I see your Nginx config?
After you use
npm run build, you actually set the Nginx for html file.