Reputation: 34959
Assume that I have a js file that has a timer and in the timer callbacks, I want to create an HTTP Server in a random port.
Well, How can I create HTTP servers in a child or sub process in nodejs?
Upvotes: 0
Views: 255
Reputation: 6339
You don't need to have a sub process you can run as many webserver as you want on a single process. If you really want to do so, have a look a the cluster module, for example: http://nodejs.org/api/all.html#all_cluster
Upvotes: 1