On Fr. Apr. 10 2015 21:24:31 Aria Stewart wrote:
> On Friday, April 10, 2015 at 3:20:24 PM UTC-4, Ingwie Phoenix wrote: 
>> Step 2: use the cluster module. That's exactly what it's for. It's better 
>> designed in iojs and node 0.12 than node 0.10, but the general idea is the 
>> same.
> Do I listen on the port on the master or child process?
> 
> In the child. Counterintuitive, but that's how the magic happens. 
Well if it works, it works. :)

> I looked into pm2, but I got a bit confused with it. I only saw CLI usage. 
> What is a basic in-script usage?
> 
> 
> CLI is the normal way -- it wraps your process and starts it, injecting its 
> magic.   Weird, but works pretty well.
Mm…I prefer to keep things self-contained. Workerman is the same for PHP, 
really. I have a main script and then call that instead of a pre-installed 
program. Gives me more control of the used versions and alike. I also looked at 
forever - but neither pm2 or forever seem to allow to simply be require()’d and 
then set up… well, looks like I’ll have to make my own cluster initializer then.

> Mind the license though.

What exactly do you mean? I am not a native english, so reading licenses 
usually gives me grande headaches...

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/C91F6A55-740F-4369-BFC7-D3F3D2B80FB7%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to