clusterstart

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i clusterstart

Weekly Downloads

3

Version

0.0.1

License

none

Last publish

Collaborators

  • chrispaterson