🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

clusterstart

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clusterstart

Enable clusterization of an app via a launching commandline argument (--clusterize [number of cores]).

0.0.1
latest
Source
npm
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

Clusterstart

The purpose of this module is to enable an app created in Node.js to run either in cluster or on a signle core.

Installation

	$ npm install clusterstart

Commands

clusterstart allows you to import the clusterstart module into your app, then just run it as a cluster. $ node app.js --clusterize

It also allows you to specify the number of cores to run it on. $ node app.js --clusterize 4

If no number is passed, then it runs on all available cores. Likewise if the number passed in is more than the available cores, it will default to the available cores.

Example

var clusterstart = require('clusterstart'),
		http = require('http');

		http.Server(function(req, res) {
			res.writeHead(200);
			res.end("hello world\n");
		}).listen(8000);

And to run:

$ node app.js --clusterize

FAQs

Package last updated on 24 Jan 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts