Setting process.env.PORT process.env.IP for REACT app

reactjs
nodejs

#1

Hi,

I ve just followed the steps of how to setup React App, wrote a small Hello World program based on the boilerplate found on App.js and then hit run to get the preview url.

I followed the url only to found a “no app seems to be running here” usual cloud 9 screen.

The message on the Idle makes it clear that is important to listen to the right port, ip.

For cloud 9 these are $IP and 8081 Port if I am not mistaken.

Now the question is: how do I set these in the (I presume) react-scripts>config> files?

Please help if you know how to resolve this.


Open the running aplicaction (React, Webpack)
#2

If you follow the tutorial, the app will listen or right ip and port (0.0.0.0 8080)
It is handled in node_modules/react-scripts/scripts/start.js on line 53.
(I found that by looking in package.json scripts command)

Do you see errors when opening the preview?