I’m trying to build a React application (much like the book example). I want to be able to have this location point to a RESgate service running inside one of my cloud installations. As a result, I’m hosting the React application in nginx. The problem I’m having is that I can’t seem to configure the nginx.conf file to allow for the right upstream and proxy-pass configuration to get it to work.
When I manually hit the proxy-pass URL (e.g. /resgate
) I get a RESgate JSON reply. But, when I use ResClient inside my React app to connect to /resgate
(the proxy-pass URL) , it complains that it cannot make a connection to ws://localhost:9090/resgate.
Does anyone have an example nginx.conf file that works to front a RESgate installation that works from within React?
Thanks!