-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (19 loc) · 735 Bytes
/
index.js
File metadata and controls
28 lines (19 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';
var bodyParser = require('body-parser');
function EmberCLIBodyParser(project) {
this.project = project;
this.name = 'Ember CLI express-bodyparser';
}
EmberCLIBodyParser.prototype.serverMiddleware = function serverMiddleware(options) {
var app = options.app,
proxy = options.options.proxy;
// body-parser + proxy-middleware = bad (https://github.com/nodejitsu/node-http-proxy/issues/180)
if (proxy) { return; }
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
};
EmberCLIBodyParser.prototype.included = function included(app) { return; };
EmberCLIBodyParser.prototype.treeFor = function treeFor(name) { return; };
module.exports = EmberCLIBodyParser;