When working locally outside of Cloud9 I would use
npm run start && open http://localhost:3000 to run my NodeJs app locally. How to get it to work in Cloud9 IDE?
If I run
npm run start in Cloud9 and then go to https://appname-username.c9users.io/, I get the error:
“Invalid Host header”. Therefore, based on the instructions here I first define the host and port:
export HOST=$C9_HOSTNAME && export PORT=8080
npm run start
This however still generates an error:
Could not find an open port at appname-username.c9users.io. Network error message: listen EADDRNOTAVAIL 188.8.131.52
I understand from here that 8080 is the right port. Or has this changed? I’ve also tried ports 8081 and 8082 but with the same result. What am I doing wrong?