Skip to content

Commit

Permalink
Merge pull request #165 from conrad-vanl/fix-readme-connect
Browse files Browse the repository at this point in the history
Fix readme example for using connect.js
  • Loading branch information
Sashko Stubailo committed Oct 5, 2016
2 parents b6819ec + 9b9f4a7 commit 10dd909
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### VNEXT
* Pass `ctx` instead of `ctx.request` to options function in Koa integration ([@HriBB](https://github.com/HriBB)) in [PR #154](https://github.com/apollostack/apollo-server/pull/154)
* Manage TypeScript declaration files using npm. ([@od1k](https:/github.com/od1k) in [#162](https://github.com/apollostack/apollo-server/pull/162))
* Fix connect example in readme. ([@conrad-vanl](https://github.com/conrad-vanl) in [#165](https://github.com/apollostack/apollo-server/pull/165))

### v0.3.2
* Added missing exports for hapi integration ([@nnance](https://github.com/nnance)) in [PR #152](https://github.com/apollostack/apollo-server/pull/152)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@ app.listen(PORT);
### Connect
```js
import connect from 'connect';
import bodyParser from 'body-parser';
import { apolloConnect } from 'apollo-server';
import http from 'http';

const PORT = 3000;

var app = connect();

app.use('/graphql', bodyParser.json(), apolloConnect({ schema: myGraphQLSchema }));
app.use('/graphql', bodyParser.json());
app.use('/graphql', apolloConnect({ schema: myGraphQLSchema }));

app.listen(PORT);
http.createServer(app).listen(PORT);
```

### Hapi
Expand Down

0 comments on commit 10dd909

Please sign in to comment.