Use body-parser module to parse POST requests
This commit is contained in:
Родитель
1ae710c7df
Коммит
759d933d74
11
package.json
11
package.json
|
@ -30,15 +30,16 @@
|
|||
"gulp-eslint": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.14.1",
|
||||
"del": "^2.0.2",
|
||||
"docco": "^0.7.0",
|
||||
"express": "^4.13.3",
|
||||
"glob": "^5.0.14",
|
||||
"request": "^2.64.0",
|
||||
"swig": "^1.4.2",
|
||||
"gulp": "^3.9.0",
|
||||
"del": "^2.0.2",
|
||||
"gulp-docco": "0.0.4",
|
||||
"docco": "^0.7.0",
|
||||
"gulp-load-plugins": "^0.10.0",
|
||||
"gulp-swig": "^0.7.4"
|
||||
"gulp-swig": "^0.7.4",
|
||||
"request": "^2.64.0",
|
||||
"swig": "^1.4.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
var express = require('express');
|
||||
var bodyParser = require('body-parser');
|
||||
var glob = require('glob');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var app = express();
|
||||
|
||||
app.use(bodyParser.json());
|
||||
|
||||
app.use(function forceSSL(req, res, next) {
|
||||
var host = req.get('Host');
|
||||
var localhost = 'localhost';
|
||||
|
|
Загрузка…
Ссылка в новой задаче