1.0.4 • Published 5 years ago

node-routine-handler v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
5 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

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago