Remove middleware: connect.bodyParser()

Because `connect.bodyParser()` is deprecated
and will be removed in Connect 3, this
commit removes it from the stack and
uses `express.urlencoded()` and
`express.json()` instead.

Visit the [Connect Wiki][wiki] for more information.

[wiki]: https://github.com/senchalabs/connect/wiki/Connect-3.0
This commit is contained in:
Steffen Bruchmann 2013-12-12 04:19:15 +01:00
parent e0c17c3328
commit 83ba2d5771

View File

@ -18,7 +18,8 @@ function createApplication() {
Proto.mixin(Application, app);
app.init();
// Add REST provider by default, can always be disabled using app.disable('feathers rest')
app.use(express.bodyParser()).configure(providers.rest());
app.use(express.urlencoded());
app.use(express.json()).configure(providers.rest());
return app;
}