From c630c051e282b168b24906fb0dda2150fb257576 Mon Sep 17 00:00:00 2001 From: Buck DeFore Date: Sat, 9 Jan 2016 16:50:34 -0800 Subject: [PATCH] update middleware readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 619545b..9e2b8b8 100644 --- a/README.md +++ b/README.md @@ -51,16 +51,16 @@ Any items specified in the `webpack.config` of your configuration will be merged You can add your own Express middleware like so: ```javascript -import universal from 'universal-redux'; +import { express, renderer, start } from 'universal-redux'; import config from '../config/universal-redux.config.js'; -const app = universal.app(); +const app = express(config); // app.use(someMiddleware); // app.use(someOtherMiddleware); -universal.setup(config); -universal.start(); +app.use(renderer(config)); +start(app, config); ``` Alternatively, you may create your own Express instance, add middleware beforehand and pass that instance as parameter when calling `universal.app(app)`.