Skip to content
A PubSub hub implementation in node.js
Find file
Latest commit 1868432 @elliotttf Merge pull request #18 from acquia-pso/accept-headers
Set Accept header on HTTP requests
Failed to load latest commit information.
lib Set Accept header on HTTP requests
public/stylesheets Baseline for subscription server.
routes Remove connect-form dependencies and lock down versions of libraries.
tests Tests for hub code.
views Baseline for subscription server.
.gitignore Adding an example config file.
LICENSE.txt Adding info about where server listens. Remove command line artifacts so that the commands are copy-pasteable.
app.js Changes to support node v0.8+
example_local.json Confirm local.json file is present, and update example_local.json fil…
factory.js #16 Allow feed subscriptions to exist without subscribers.
package.json Changes to support node v0.8+


A node.js implementation of a PubSub hub which allows one to many communication:

  • one: the feed to subscribe to.
  • many: the subscribers to respond to.


This application requires MySQL as a persistant data store. To connect to the database copy the example_local.json file to local.json and fill out the appropriate connection details.


It's easiest to install PubHub with npm:

npm install

The specific packages used are listed in the package.json file.

Currently, you must manually create the MySQL database tables. See for the commands to do this.

After the database is created, copy example_local.json to local.json and fill out the appropriate connection settings.


node app.js

The server listens on port 3000 by default. You can add subscriptions by sending Pubsubhubbub subscribe requests to $HOST:3000/subscribe.

Something went wrong with that request. Please try again.