Npm start does not work on cloud9 workspace


#1

Hello,
I’ve been trying to run an angular seed project… which runs a simple http-server. On doing -

npm start

I get -

Starting up http-server, serving .
Available on:
  http://127.0.0.1:8080
  http://172.17.0.190:8080
Hit CTRL-C to stop the server

But the above links do not work. I’m not sure what can be going wrong here.
(the https versions don’t work either)

How can we fix this?
Thanks


#2

To solve this, tell your server to listen on process.env.IP and process.env.PORT. This is crucial, because your app must be listening on 0.0.0.0 to be accessible, as localhost/127.0.0.1 is not externally available.


#3

Thank you for your reply dannytech.
I found an easy solution - Just click on “preview” above and click “click preview running application”.
Now it runs all well :slight_smile: