Set up proxy server for create react app Set up proxy server for create react app express express

Set up proxy server for create react app


You didn't have to eject to run your server.js. You can just run it with node server.js together with create-react-app.

You can still do npm start even after ejecting to start your dev server.

To run /api1 and /api2, you just have to handle it in your server.js file and it should work just fine. You need to match the port in your server.js and the one in proxy settings inside package.json - in this case, it should be "proxy": "http://localhost:3031"