Skip to content

replace `node` runtime with `rizzle` to start your nodejs application in cluster mode

License

Notifications You must be signed in to change notification settings

jakoblorz/rizzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rizzle

replace node runtime with rizzle to start your nodejs application in cluster mode

Installing

This package is listed on npm:

npm install rizzle

Usage

You can just replace each node call in the terminal/cmd/bash with rizzle. Make use of the -f and -c parameters:

  • -f restarts slaves which stopped running due to an error - does not restart slaves which stopped successfully
  • -c <num> specify the number of slaves to start - default is the number of cpus (os.cpus().length)

node ./test.js becomes rizzle ./test.js -f -c 5

Example

// server.js

const http = require("http");
http.createServer((request, response) => response.end("success message sent from " + process.pid))
    .listen(8080, "localhost");
rizzle ./server.js -f -c 5

About

replace `node` runtime with `rizzle` to start your nodejs application in cluster mode

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published