npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

respawn-group

v1.1.0

Published

Manage a group of respawn monitors

Readme

respawn-group

Manage a group of respawn monitors

npm install respawn-group

Usage

var regroup = require('respawn-group');
var group = regroup();

group.add('test', ['node', 'server.js']);
group.start('test');

API

  • 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

Events

  • 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

Updating existing monitors

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

License

MIT