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

Commit

Permalink
Merge pull request #99 from stheobald/patch-1
Browse files Browse the repository at this point in the history
docs(readme): clarify express middleware
  • Loading branch information
bdefore committed Apr 18, 2016
2 parents 1e2ef81 + 5b4434d commit a98dc68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Any items specified in the `webpack.config` of your configuration will be merged

#### Express middleware

You can add your own Express middleware like so:
You can add Express middleware by creating your own server.js like so:

```javascript
import { express, renderer, start } from 'universal-redux';
Expand All @@ -65,6 +65,8 @@ app.use(renderer(config));
start(app, config);
```

You will need to run this server.js instead of calling the default universal-redux-server.

Alternatively, you may create your own Express instance, add middleware beforehand and pass that instance as parameter when calling `universal.app(app)`.

#### Redux middleware
Expand Down

0 comments on commit a98dc68

Please sign in to comment.