Sunday, 22 July 2018

Deploying create-react-app on nginx with a separate backend

So... you've followed the instructions here and created your shiny new React app, with its own server-side element. Now you want to deploy it to your Production server, which runs nginx... how will you approach it?

The naïve way

Quick and simple - clone your project, start the server and client services, and point nginx at your client app, same as you did during development.  The "proxy" config in the client app then redirects requests to the backend server.

Does this seem right? I don't think so...