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 🙏

© 2025 – Pkg Stats / Ryan Hefner

express-browserify-deployer

v1.4.0

Published

Simple deployer script for Node JS projects built with expressjs and its browser JS counterpart transpiled with Browserify

Readme

Express + Browserify deployer

(yeah, I know, an awfull name)

Small script to:

  • Transpile your client JS code (with JSX by default)
  • Handle version number (taken from package.json)
  • Select target server to deploy to
  • Upload files via SSH
  • Install NPM dependencies in target server
  • Restart service hosting the deployed service

Installation

npm install -g express-browserify-deployer

Pay special attention to:

If you are working with NVM, you may have some problems with global NPM modules (as I had)
To fix it you should set the environment variable NODE_PATH to the exact location where your node modules are being installed to.
Mine was in /home/<me>/.nvm/versions/node/v0.12.7/lib/node_modules

Usage

Sitting in your app dir, having there the code you want to deploy type:

deploy

That easy? YES, that's the idea.

Configuration

Well, actually it's not so so simple, first you need to have some configuration in place.
The script will look for the file deploy.json, in your app root directory (usually, there you have the package.json file. If such file is not present, the script will ask you for the values it was expecting to find there, and afterwards will write the deploy.json file for you.
The deploy.json file should look something like:

{
	"servers": ["svrname1", "svrname2"],
	"appDirInServer": "/opt/yourawesomeapp",
	"restartCommand": "systemctl restart yourawesomeapp_service",
	"entryFile": "./app/browserapp.js",
	"outputFile": "./public/js/bundle.js",
  "buildCommand": "npm run build-prod",
	"filesToUpload": [
		"app/routes",
		"app/models",
		"public",
		"config.js",
		"package.json",
		"server.js"
	]
}

OK, what are we looking at here? Lets see:

  • servers: this is an array containing the names of the servers you may deploy to (ie: staging and production servers)
  • appDirInServer: this is the directory where your app will be located in the previously defined servers (by now it must be the same in all the servers defined)
  • restartCommand: here you have to type the linux command to restart your app service.
  • entryFile (optional): the root file of your client JS app (this was built with React, ES2015 and browserify in mind)
  • outputFile (optional): the browserify output file.
  • buildCommand (optional): If you provide this command, it will ignore entryFile and outputFile and will use this command to build the JS bundle to deploy.
  • fileToUpload: which files and folders, of the directory you're standing at, you want to upload to the defined servers.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

@luispablo