Push live changes to your end users

npm install hotfix
4 downloads in the last week
16 downloads in the last month


Hotfix is a simple utility that pushes new fixes to the end client while they're still on your site.


Dev Dependencies


  • phantomjs - brew install phantomjs


  • browserify - npm i browserify -g
  • closure-compiler - brew install closure-compiler
  • coffee-script - npm i coffee-script -g


Assuming you have node.js installed, call:

npm i hotfix -g


There are a few ways to use hotfix:

Hotfix & Express

  1. First create a simple server:
var express = require("express"),
hotfix = require("hotfix"),
server = express();
  1. Next, add this script tag to the header of your HTML document:
    <script src="/hotfix/main.bundle.js"></script>
    Hello World!
  1. Open a browser, and navigate to http://localhost:8080.
  2. Make a change to your HTML doc, and call hotfix push-changes in the command line to refresh all open pages.

Hotfix & the command line

You can also use hotfix without node.js. To get started, run:

hotfix run-server --port=8080


Running a critical update that forces the user to refresh

hotfix push-changes --critical

Running an update against only certain clients (assuming you have something like assigned). Note that all mongodb-like queries are accepted since the hotfix client uses sift.

hotfix push-changes --filter="{\"app.version\": 19 }"

Customizing the end-user message

hotfix push-changes --message="This page is about to refresh due to connectivity issues"

CLI Usage

Usage: [command] --arg=value --arg2

  help                        Show help menu
  [cmd] help                  Show command help menu

  run-server                  Runs the hotfix http server
  push-changes                Pushes changes to all clients that are currently viewing the site

run-server command

Runs the hotfix http server

Usage: run-server

Optional Flags:
  --port=8080                 The http port to run hotfix on

push-changes command

Pushes changes to all clients that are currently viewing the site

Usage: push-changes

Optional Flags:
  --filter                    mongodb-style filter for each client
  --message=New updates a...  Message to display to the client.
  --critical                  Critical update - user account is force refreshed.
  --config=/usr/local/etc...  Configuration file for pubnub.
npm loves you