Skip to content
SPDY-ize express.js sites.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


WARNING: this is very, very alpha stuff.

SPDY is a new protocol from Google based on HTTP. It aims for 50% decrease in page load times over vanilla HTTP.

Currently Google Chrome is the only browser that supports SPDY.

The express-spdy package aims to allow existing express.js sites to experiment with SPDY without making (many) changes.


Install the latest snapshot of openssl with NPN and shared objects. Currently (6/21/2011), this requires obtaining a SNAP tarball from the openssl FTP server or checking out the latest trunk from the openssl CVS server.

Install node.js 0.5.0-pre or later. Currently (6/21/2011), this requires installing node from the master repository (0.4.8 will not work).

NOTE: this will NEVER work on node 0.5.4!!! (will support 0.5.5 when available)

With the npn-enabled node, npm install express-spdy.

Detailed instructions in


An express.js app can then be SPDY-ized by changing the first few lines to:

var express = require('express-spdy')
  , fs = require('fs');

var app = module.exports = express.createServer({
  key: fs.readFileSync(__dirname + '/keys/spdy-key.pem'),
  cert: fs.readFileSync(__dirname + '/keys/spdy-cert.pem'),
  ca: fs.readFileSync(__dirname + '/keys/spdy-csr.pem'),
  NPNProtocols: ['spdy/2']

Detailed instructions in


  • Tests
  • Server push
  • Documentation (of course)


Huge thanks to Fedor Indutny for his awesome node-spdy. Very little was required to get express-spdy working thanks to his hard work.

Something went wrong with that request. Please try again.