Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.2 KB

README.md

File metadata and controls

24 lines (18 loc) · 1.2 KB

Express-Juggernaut-Demo

Simple demo that combines Express.js and Juggernaut 2. More or less a boilerplate app.

Quick setup:

  • Step 1: Install socket.io -- npm install http://cl.ly/2dgx/content
  • Step 2: Install node-static -- npm install http://github.com/cloudhead/node-static/tarball/master
  • Step 3: Install redis-client -- npm install http://github.com/technoweenie/redis-node-client/tarball/npm
  • Step 4: Install Redis -- Redis
  • Step 5: Clone the repo -- git clone git://github.com/shripadk/express-juggernaut.git
  • Step 6: cd into the directory and launch server.js -- $ sudo node server.js
  • Step 7: No step 7! You have got your express-juggernaut app running! Yay!

Customizing:

By default the Juggernaut listens to the Express http.Server() instance. You can override this and launch Juggernaut on a separate port. Just provide the port number, eg: Juggernaut.listen(8080)

If you want to change redis client options (publisher), you can edit configureClient() in server.js Just pass the options as an object literal to configureClient(port, host, options).

Eg: configureClient(6379, 127.0.0.1, {maxReconnectionAttempts: 10})