node.js - How to configure the port of the server (process.env.PORT) in cloud9? -


i use cloud9 locally , able configure port when running node server (because using socket.io on client side , it's not convenient have update path after each starts).

i have seen can start server command line, guess there didn't find on node -help

when connecting socket.io in browser, io.connect(location.host). location.host automatically hostname:port current web page served, no need ever change regardless of deployment. i'm not familiar cloud9 in particular, in node web servers, explicitly specify port listen on when calling server.listen(port, optionalip).


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -