Heroku: How to deploy a node app with client and server running on different ports?

You CAN NOT deploy two services in one Heroku app. In short, you have to deploy them to separate Heroku dynos to deploy two apps.

More information is provided in this stackoverflow answer to a similar question.

PS: It is always an option to serve JS files from your API server after building React files.

Hope this helps!


This repo shows the setup of Node.js serving up a React frontend running on a single Heroku dyno: https://github.com/mars/heroku-cra-node I was able to get one up and running using this as a guide.