Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
respawn-group
Advanced tools
Manage a group of respawn monitors
npm install respawn-group
var regroup = require('respawn-group');
var group = regroup();
group.add('test', ['node', 'server.js']);
group.start('test');
regroup(defaults) -> group
Instantiate a new respawn group. All opts
will inherit from defaults
group.add(id, command, opts) -> mon
Add a new respawn monitor. See respawn for more information. If you add a new monitor with the same id as an old one it will be used when the old monitor stops.
group.remove(id, cb)
Remove a monitor
group.start(id) -> mon
Start a monitor
group.stop(id, cb)
Stop a monitor
group.restart(id) -> mon
Gracefully restart a monitor
group.get(id) -> mon
Get a monitor
group.has(id) -> bool
True is group has monitor
group.list() -> array
List all monitors
group.shutdown(cb)
Stop all services and ignore all following starts
group.on('start', mon)
Monitor has started. mon.id
contains the id of the monitor
group.on('stop', mon)
Monitor is fully stopped
group.on('crash', mon)
Monitor has crashed
group.on('restart', mon)
Monitor is being restarted
group.on('sleep', mon)
Monitor is sleeping
group.on('spawn', mon, process)
Monitor has spawned a child process
group.on('exit', mon, code, signal)
Monitors child process has exited
group.on('stdout', mon, data)
child process stdout has emitted data
group.on('stderr', mon, data)
child process stderr has emitted data
group.on('warn', mon, err)
Monitor has a warning
group.on('finalize', mon)
A monitor is fully stopped and being garbage collected. Happens if you call remove or updates a monitor
To update an existing monitor simply add it again with the same id
group.add('test', ['node', 'server.js']);
// ... wait a bit ...
// now lets update test
group.add('test', ['node', 'server2.js']);
group.restart('test'); // you need to restart test for the new monitor to take over
// this will trigger a 'finalize' event for the old monitor
MIT
FAQs
Manage a group of respawn monitors
The npm package respawn-group receives a total of 2 weekly downloads. As such, respawn-group popularity was classified as not popular.
We found that respawn-group demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.