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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -