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

dev

v0.1.5

Published

Reruns the given file whenever the current working dir subtree has modifications. Note: this module will be rewritten and change functionality.

Downloads

53,068

Readme

Notice: this module will be rewritten and change functionality

A rewrite is planned. Until then, the existing Linux/inotify implementation remains as documented below.

Linux only

The module relies on inotify, only available for Linux.

For other OS I'd recommend supervisor or nodemon.

What does it do?

It autoreloads Node.JS in case of any file changes.

$ npm install dev -g

$ node-dev app.js

Starting: app.js
> server is listening on http://127.0.0.1:8080

node-dev will rerun app.js whenever one of the watched files is changed.

The module is based on inotify. So, unlike most other modules of this kind, it starts watching new files automatically.

A number of additional options make the module really flexible and extendible.

Install

npm install dev -g

Global installation is preferred to have node-dev utility in path.

Simple usage

If you've installed it globally, then there is a node-dev on path, so chdir to your app and run it:

$ node-dev app.js

Starting: app.js
> server is listening on http://127.0.0.1:8080

Then go to your IDE and edit files. node-dev keeps your app up-to-date. The only need to switch to terminal is when there are errors.

But even if there are errors, you can switch back to IDE, correct them and node-dev will autorestart the server again for you.

By default, files under ./public, files with extensions .db, .dirtydb, files and directories starting with dot . are not watched.

Advanced usage

The node-dev utility is a tiny file which basically contains two lines:

var manager = require("dev")(options);
manager.start();

You can copy and modify it, or create your own, more featured autorestarter on it's base. The options object may have following properties:

Running

  • run: the js file to run, e.g ./app.js, it is the only required option.

Watch/Ignore

  • watchDir: the folder to watch recursively, default: .
  • ignoredPaths [ paths ]: array of ignored paths, which are not watched, members can be:
    • string, matched exactly against path, like ./public,
    • RegExp, e.g an extension check: /\.gif$/
    • function(path), which takes the path and returns true if it should be ignored

Logging

  • debug: enables additional logging output about watches and changes, default: false
  • logger: custom logger object, must have error(...) and debug(...) methods, delegates to console.log by default. Can use any other logger.

Info

  • onRunOutput: callback function(output), called for stdout data from the running process
  • onRunError: callback function(output), called for stderr data from the running process

You can use these to send error notifications and integrate with your development environment if you wish.

Troubleshooting

This module doesn't compile/run on non-Linux OS. See the head of this file for the details.

There are limits on the number of watched files in inotify. For example, Debian has 8192 by default. In most cases, that should be enough. If it's not, and you really really need to watch so many files, then you can adjust the limit.

To change the limit:

$ echo 16384 > /proc/sys/fs/inotify/max_user_watches

Or:

$ sudo sysctl fs.inotify.max_user_watches=16364

To make the change permanent, edit the file /etc/sysctl.conf and add this line to the end of the file:

fs.inotify.max_user_watches=16384