Express/Connect middleware for DoneJS applications
Switch branches/tags
0.3-legacy greenkeeper/can-component-4.1.0 greenkeeper/can-component-4.1.1 greenkeeper/can-component-4.1.2 greenkeeper/can-component-4.1.3 greenkeeper/can-component-4.2.0 greenkeeper/can-component-4.2.1 greenkeeper/can-component-4.2.2 greenkeeper/can-component-4.2.3 greenkeeper/can-component-4.2.4 greenkeeper/can-component-4.3.0 greenkeeper/can-component-4.4.0 greenkeeper/can-component-4.4.2 greenkeeper/can-component-4.4.3 greenkeeper/can-component-4.4.4 greenkeeper/can-component-4.4.5 greenkeeper/can-component-4.4.6 greenkeeper/can-component-4.4.7 greenkeeper/can-component-4.4.8 greenkeeper/can-component-4.4.9 greenkeeper/can-component-4.4.10 greenkeeper/can-component-pin-4.0.8 greenkeeper/can-component-pin-4.1.1 greenkeeper/can-define-2.6.0 greenkeeper/can-define-2.6.1 greenkeeper/can-define-2.6.2 greenkeeper/can-define-2.6.3 greenkeeper/can-define-2.6.4 greenkeeper/can-define-2.7.0 greenkeeper/can-define-2.7.1 greenkeeper/can-define-2.7.2 greenkeeper/can-define-2.7.3 greenkeeper/can-define-2.7.4 greenkeeper/can-define-2.7.5 greenkeeper/can-define-pin-2.5.12 greenkeeper/can-route-4.1.2 greenkeeper/can-route-4.2.0 greenkeeper/can-route-4.3.0 greenkeeper/can-route-4.3.1 greenkeeper/can-route-4.3.2 greenkeeper/can-route-4.3.3 greenkeeper/can-route-4.3.4 greenkeeper/can-route-4.3.5 greenkeeper/can-route-4.3.6 greenkeeper/can-route-4.3.7 greenkeeper/can-route-4.3.8 greenkeeper/can-route-4.3.9 greenkeeper/can-route-4.3.10 greenkeeper/can-route-4.3.11 greenkeeper/can-route-4.3.12 greenkeeper/can-route-4.4.0 greenkeeper/can-route-4.4.1 greenkeeper/can-route-4.4.2 greenkeeper/can-route-4.4.3 greenkeeper/can-route-4.4.4 greenkeeper/can-route-4.4.5 greenkeeper/can-route-4.4.6 greenkeeper/can-route-pushstate-5.0.8 greenkeeper/can-route-pushstate-5.0.9 greenkeeper/done-css-3.0.2 greenkeeper/done-css-pin-3.0.1 greenkeeper/jquery-3.3.1 greenkeeper/jquery-pin-3.3.0 greenkeeper/mocha-5.0.0 greenkeeper/mocha-5.0.1 greenkeeper/mocha-5.0.2 greenkeeper/mocha-5.0.3 greenkeeper/mocha-5.0.4 greenkeeper/mocha-5.0.5 greenkeeper/mocha-5.1.0 greenkeeper/mocha-5.1.1 greenkeeper/mocha-5.2.0 greenkeeper/nock-9.0.14 greenkeeper/nock-9.0.15 greenkeeper/nock-9.0.16 greenkeeper/nock-9.0.17 greenkeeper/nock-9.0.18 greenkeeper/nock-9.0.19 greenkeeper/nock-9.0.20 greenkeeper/nock-9.0.21 greenkeeper/nock-9.0.22 greenkeeper/nock-9.0.23 greenkeeper/nock-9.0.24 greenkeeper/nock-9.0.25 greenkeeper/nock-9.0.26 greenkeeper/nock-9.0.27 greenkeeper/nock-9.0.28 greenkeeper/nock-9.1.0 greenkeeper/nock-9.1.1 greenkeeper/nock-9.1.2 greenkeeper/nock-9.1.3 greenkeeper/nock-9.1.4 greenkeeper/nock-9.1.5 greenkeeper/nock-9.1.6 greenkeeper/nock-9.1.7 greenkeeper/nock-9.1.8 greenkeeper/nock-9.1.9 greenkeeper/nock-9.1.10 greenkeeper/nock-9.2.0 greenkeeper/nock-9.2.1 greenkeeper/nock-9.2.2 greenkeeper/nock-9.2.3 greenkeeper/nock-10.0.0 greenkeeper/nock-10.0.1 greenkeeper/nock-10.0.2 greenkeeper/nock-10.0.3 greenkeeper/nock-10.0.4 greenkeeper/nock-pin-9.0.13 greenkeeper/spawn-mochas-2.0.0 greenkeeper/steal-tools-1.4.0 greenkeeper/steal-tools-1.4.1 greenkeeper/steal-tools-1.5.0 greenkeeper/steal-tools-1.6.0 greenkeeper/steal-tools-1.7.0 greenkeeper/steal-tools-1.7.1 greenkeeper/steal-tools-1.7.2 greenkeeper/steal-tools-1.8.0 greenkeeper/steal-tools-1.8.1 greenkeeper/steal-tools-1.8.2 greenkeeper/steal-tools-1.8.3 greenkeeper/steal-tools-1.8.4 greenkeeper/steal-tools-1.9.0 greenkeeper/steal-tools-1.9.1 greenkeeper/steal-tools-1.9.2 greenkeeper/steal-tools-1.9.3 greenkeeper/steal-tools-1.10.0 greenkeeper/steal-tools-1.10.1 greenkeeper/steal-tools-1.10.2 greenkeeper/steal-tools-1.11.0 greenkeeper/steal-tools-1.11.1 greenkeeper/steal-tools-1.11.2 greenkeeper/steal-tools-1.11.3 greenkeeper/steal-tools-2.0.0 greenkeeper/steal-tools-2.0.1 greenkeeper/steal-tools-2.0.2 greenkeeper/steal-tools-2.0.3 greenkeeper/steal-tools-2.0.4 greenkeeper/steal-tools-2.0.5 greenkeeper/steal-tools-2.0.6 greenkeeper/steal-tools-2.0.7 greenkeeper/steal-tools-2.0.8 greenkeeper/steal-tools-2.0.9 greenkeeper/steal-tools-2.0.10 greenkeeper/steal-tools-2.0.11 greenkeeper/steal-tools-pin-1.3.6 master ssr-013 supercache
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
scripts
test
.editorconfig
.gitignore
.npmignore
.npmrc
.travis.yml
LICENSE.md
README.md
appveyor.yml
package.json

README.md

Build Status npm version

done-ssr-middleware

Greenkeeper badge

Simple Express/Connect middleware for server-side rendering your DoneJS application.

Install

npm install done-ssr-middleware

Usage

Use the middleware to add server-side rendering to an existing Express server:

var ssr = require('done-ssr-middleware');

app.use('/', ssr({
  config: __dirname + '/public/package.json!npm'
}));

The middleware includes a live-reload utility that can automatically refresh the cache for server-rendered responses. Use the liveReload option to enable this feature:

app.use('/', ssr({
  config: __dirname + '/public/package.json!npm',
  liveReload: true
}));

Note: Make sure the ssr middleware is the last middleware in the chain but before the error handler. Errors when rendering the application will be passed to your Express error handler. Error status codes (e.g. 404s or others) will be rendered with the application.

Options

This module shares the same system and options arguments as done-ssr.

License

MIT