Interesting question. One would think than you could put the http server example in the code multiple times with a different variable for each httpserver. I don't see any reason why that wouldn't work. Should only take a few minutes to try it.
On Mon, Feb 10, 2014 at 11:00 AM, Arman Didandeh <[email protected]>wrote: > So there is no way to run one executable that listens to different ports? > > > On 10 February 2014 13:58, Mark Hahn <[email protected]> wrote: > >> It should be as simple as running a different node executable for each >> server. In other words you'd do >> >> node server1.js >> node server2.js >> node server3.js >> >> where each executable is using a different port. You might want to make >> the port an argument so you could say `node server.js 8080`. >> >> >> On Mon, Feb 10, 2014 at 10:48 AM, Arman Didandeh < >> [email protected]> wrote: >> >>> Dear all, >>> >>> I am a newbie when it comes to node.js, so I need your help towards >>> running multiple instances of my node.js server on my machine. >>> >>> I do not want to use other tools that manage this and prefer to do the >>> confing to learn more. >>> >>> Also I do not need to assign each of these instances to a core (as I >>> have seen is very popular in discussion forums). >>> >>> All I need is for my local machine (which is acting as the server during >>> the development phase), to be able to listen to different ports. This way >>> myself and other developers can test their changes in code through these >>> connections and once everything is stable, each person could commit to our >>> git repo. Also the same machine is working as the actual server for current >>> users so it is probably using port 80. >>> >>> Thanks in advance for your helps. >>> >>> Cheers all, >>> Arman >>> >>> -- >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> For more options, visit this group at >>> http://groups.google.com/group/nodejs?hl=en?hl=en >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "nodejs" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/nodejs/FOkOcKQ68Ew/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
