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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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