Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
update middleware readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bdefore committed Jan 10, 2016
1 parent d04c0cb commit c630c05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`.
Expand Down

0 comments on commit c630c05

Please sign in to comment.