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 🙏

© 2024 – Pkg Stats / Ryan Hefner

rocksteady

v1.1.9

Published

Drink blazin' electric death, downtime! Fast, zero-downtime apps for production enviroments.

Downloads

25

Readme

Rocksteady Build Status

Drink blazin' electric death, downtime!

Fast, zero-downtime apps for production enviroments. Rocksteady runs your node app and keeps it running for you. It can reload your app and browser on file modifications for more productive development and reload on SIGHUP for zero-downtime app upgrades.

Installation

$ npm install -g rocksteady

Usage

Point rocksteady at your node app and off you go. You can use the rocksteady:

$ rocksteady ./my-app.js

Or require rocksteady into your project and pass it the path directly:

require('rocksteady').run('./app')

CLI

Run rocksteady -h for a complete list of options.

rocksteady server.js [options]

Options:
  --port             Specify port to listen on.
  --workers          Number of workers to start.
  --restart-cooldown Seconds to wait before respawning workers that die.
  --force-kill       Seconds to wait before killing unresponsive worker.
  --watch            Watch for and reload server/browser on changes.

API

rocksteady(serverModule, [options])

Returns a new instance of Master with given options.

Class: rocksteady.Master

Master represents a running app, it is an EventEmitter.

new rocksteady.Master(serverModule, [options])

  • serverModule [String] Should be a path to a module (either JavaScript or CoffeeScript) which exports either a connect/express app or an instance of http.Server
  • options [Object]
    • port [Number] Port to listen on
    • workers [Number] Number of workers to fork
    • forceKillTimeout [Number] Number of seconds to wait before killing an unresponsive worker
    • socketTimeout [Number] Number of ms to wait before socket times out
    • watch [Boolean] Whether or not to watch for changes and reload server/browser.
    • runAs [Object]
      • dropPrivileges [Boolean] Whether to drop privileges if running as root.
      • gid [String] gid to change to
      • uid [String] uid to change to
    • setupMaster [Object] options to pass to cluster
    • logger [Object] logger to use

Event: 'worker:exception'

function (worker, err) { }

Emitted when worker process messages an uncaught exception. err is a deserialized error message.

Event: 'worker:forked'

function (worker) { }

Emitted when worker is forked.

Event: 'worker:killed'

function (worker) { }

Emitted when worker is killed.

Event: 'worker:restarting'

function (worker) { }

Emitted when worker is restarted.

Event: 'worker:listening'

function (worker, address) { }

Emitted when worker is starts listening.

Event: 'reloading'

function () { } Emitted when reload begins.

Event: 'shutdown'

function () { } Emitted when shutdown ends.

Event: 'watch'

function (message) { }

Emmited during development when a worker discovers a file to watch.

  • message [Object]
    • type [String] always 'watch'
    • filename [String] filename to watch, detected by worker.
    • isDirectory [Boolean] whether or not it's a directory