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

watchdocs-express

v1.0.3

Published

Set of tools to plug your Express.js application into Watchdocs.io

Readme

watchdocs.io - express.js middleware

CircleCI

Set of tools to plug your Express.js application into Watchdocs.io.

Installation

Watchdocs middleware can be installed directly from github via npm.

$ npm install watchdocs-express --save

Usage

Basic Watchdocs.io usage requires very little configuration:

Specify appId and appSecret (you can get them from settings page in https://app.watchdocs.io) and you are ready to go!

const express = require('express')
const app = express()

const watchdocs = require('watchdocs-express')

const opts = {
  appId: APP_ID,
  appSecret: APP_SECRET
}
app.use(watchdocs(opts))

app.get('/api/hello', function (req, res) {
  res.json({ hello: 'world' })
})

app.listen(3000, function () {
  console.log('Example app listening on port 3000!')
})

After running this code you should see following message in console:

[Watchdocs.io]: * Watchdocs.io middleware is listening for api calls *

To begin collecting endpoint data open your application and start using it casually or run E2E tests.

Each endpoint call will be recorded, data sanitized and stored in temporary store file which will be later send to Watchdocs.io.

It is highly recommended to run this middleware only on dev (or testing) envirovement.

Advanced usage

Watchdocs.io middleware for express.js let's you configure it for more advanced usage.

Everything will be done via opts object passed to watchdocs function.

Here's example:

// ...

const opts = {
  appId: 'YOURAPP-123',
  appSecret: 'FHQFN^Gwhgw^FNFNWAQ34dDF',
  host: 'https://[your-self-hosted-watchdocs.io]/api/v1/reports',
  batchSize: 25
}
app.use(watchdocs(opts))

// ...

opts object properties

  • appId (required)

    • Your application identifier. You can find it in Settings section of your Watchdocs.io project.
  • appSecret (required)

    • Used to authenticate middleware report requests. You can find it in Settings section of your Watchdocs.io project.
  • host (optional, defaults to: https://watchdocs-api.herokuapp.com/api/v1/reports)

    • Watchdocs.io endpoint to which gathered data will be sent. Do not change it unless you have hosted plan of Watchdocs.io.
  • batchSize (optional, defaults to 10)

    • Size of report batch sent to Watchdocs.io. Value can be any positive integer.
  • verbose (optional, defaults to true)

    • Whether to show watchdocs logging in the console. (If it's set to false errors will be hidden too.)

Contribution

If you'd like to help improving this middleware please clone it on your machine and then open a Pull Request describing made changes.

$ git clone https://github.com/kkalamarski/watchdocs-express.git
$ cd watchdocs-express

$ npm install

Running Tests

To run unit tests run this command inside project directory:

$ npm test

To see test code coverage use this command in the same directory:

$ npm run coverage