Wednesday 17 May 2017

Is it possible to bind port and hostname to a Node.js HTTP server without making it listen yet?

Hello!My question is if I could bind the hostname and the port to a HTTP server for NodeJS without making it listen. As far as I've seen, in all the examples about how to set up a Node.js HTTP server, the host and the port are indicated in the function "listen" of the net.Server object that Node.js handles. My question would be if I could bind them without making the server listen, so when I want to make it listen, I don't need to indicate them.Thank you!

Submitted May 17, 2017 at 07:52PM by ChangeTheGlobe

No comments:

Post a Comment