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

pierrot

v0.0.0-beta.1

Published

pm2 bouncy plugin

Downloads

49

Readme

Pierrot NPM version Build Status Coverage Status

pm2 virtual-host and deploy cli

Installation

$ npm install pm2 bouncy pierrot --global

Define pierrot.yml

Can use $ sudo pierrot vhost if define one or more apps in ./pierrot.yml.

apps:
  homepage:
    repo: https://github.com/59naga/berabou.me.git
    from: 59naga.localhost
    to: 59798

Start the virtual host using 80 port.

$ sudo pierrot vhost
#[PM2] Spawning PM2 daemon
#[PM2] PM2 Successfully daemonized
#process name not found
#┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
#│ App name │ id │ mode │ pid   │ status │ restart │ uptime │ memory      │ watching │
#├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
#│ VHOST    │ 0  │ fork │ 85314 │ online │ 0       │ 0s     │ 29.520 MB   │ disabled │
#└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
#
#successfully `vhost`.
#
#  Please fix:
#
#  $ sudo chmod -R 777 ~/.pm2
#
#  See: https://github.com/Unitech/PM2/issues/837
#
$ sudo chmod -R 777 ~/.pm2

Deploy the app in local.

$ pierrot apps
? apps homepage
? task initialize
? really Yes
# apps: git clone https://github.com/59naga/berabou.me.git homepage
# apps/homepage: npm install --production
# apps/homepage: delete and start pm2 process
# process name not found
# 
# homepage was successfully the `initialize`
# 
# ┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
# │ App name │ id │ mode │ pid   │ status │ restart │ uptime │ memory      │ watching │
# ├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
# │ VHOST    │ 0  │ fork │ 85314 │ online │ 0       │ 3m     │ 29.520 MB   │ disabled │
# │ homepage │ 1  │ fork │ 85830 │ online │ 0       │ 0s     │ 34.074 MB   │ disabled │
# └──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘

Becomes...

$ tree
# .
# ├── node_modules
# ├── package.json
# ├── pierrot.yml
# └── apps
#      └── homepage
#          ├── node_modules
#          ├── package.json
#          └── ...

And be available the http://59naga.localhost if Add 127.0.0.1 59naga.localhost to /etc/hosts.

Pierrot tasks

Always set the production to process.env.NODE_ENV.

reload

  1. Pulling repositories in specified apps (eg cd apps/name && git pull).
  2. Reload the processes. (eg pm2 reload <apps...>)

update

  1. Pulling repositories in specified apps (eg cd apps/name && git pull).
  2. Install dependencies. (eg npm install --production)
  3. Reload the processes. (eg pm2 reload <apps...>)

deleteAndStart

  1. Remove the processes. (eg pm2 delete <apps...>)
  2. Start the processes using pierrot.yml[^1][^1]. (eg pm2 start <apps...>)

[^1]: Defined in the apps of pierrot.yml. originally, it shall be defined in the app.json.

initialize

  1. Delete the folder of apps if has apps/repo. (eg rm -rf <apps/name>)
  2. Clone the apps/repo as apps/name. (eg git clone apps/repoValue apps/name)
  3. Install dependencies. (eg cd apps/name && npm install --production)
  4. Start the processes using pierrot.yml. (eg pm2 start <apps...>)

302 redirect

VHOST sends the Location header in the 302 if specify app/to as string.

  oldSite:
    from: oldsite.example.com
    to: renewal.example.com
pm2 reload VHOST
# ...

curl oldsite.example.com/foo/bar?baz --head
# HTTP/1.1 302 Found
# Location: http://renewal.example.com/foo/bar?baz
# Date: Mon, 02 Nov 2015 03:36:34 GMT
# Connection: keep-alive

https

Define key and cert fields to ./pierrot.yml. Becomes add the port 443(secure mode) at pierrot vhost.

key: /path/to/private.key
cert: /path/to/public.cert

apps:
  homepage:
    repo: https://github.com/59naga/berabou.me.git
    from: 59naga.localhost
    to: 59798
$ sudo pierrot vhost
$ pm2 logs VHOST
# PIERROT_VHOST listening at http://localhost:80/
# PIERROT_VHOST listening at http://localhost:443/

License

MIT