1.0.4 • Published 6 years ago

node-routine-handler v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Features

  • Create 'n' number of Child Node Processes with custom execution commands
  • Stop-Restart created custom processes.

Requirements

This package requires Node.js v8+ to run.

Installation

$ npm install node-routine-handler

Usage

Initialise

// nodeMaster(_state,procInstance,runCmd)
var nodeMaster  = require('node-routine-handler');

Start

var procInstance = nodeMaster('start');

Restart

var new_procInstance = nodeMaster('restart',procInstance);

Stop

nodeMaster('stop',procInstance);
  • __ state: 'start'|'stop'|'restart'
  • procInstance: An instance of the child node process returned on __state='start' to be passed when stoping or restarting a particular node process
  • runCmd: the command to be executed in child node process (default:'node server')

Development

Want to contribute? Great!

https://github.com/ronork/nodeRoutineHandler

License

ISC

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago