Reputation: 748
I successfully ran hello world in cloud 9 IDE using node JS express framework by replacing
app.listen(3000);
to
app.listen(process.env.PORT);
cloud 9 is asking me to use process.env.IP as the host for the scripts. Which file do I open to replace the host name to process.env.IP?
Upvotes: 4
Views: 6125
Reputation: 16519
You can call listen
with an additional parameter like this:
app.listen(3000, '192.168.0.100');
or,
app.listen(process.env.PORT, process.env.IP);
So this should be what you are looking for. Let me know if it works!
Upvotes: 7