Comparing version 1.0.12 to 1.0.13
@@ -28,4 +28,3 @@ "use strict"; | ||
var multipart = require('connect-multiparty'), | ||
_require = require('../model'), | ||
var _require = require('../model'), | ||
Fail = _require.Fail; | ||
@@ -213,3 +212,3 @@ | ||
handlerMappings.set(path, handler); | ||
express[method](path, multipart({}), handler); | ||
express[method](path, handler); | ||
}); | ||
@@ -216,0 +215,0 @@ }); // 初始化appScope |
@@ -17,2 +17,4 @@ "use strict"; | ||
var multipart = require('connect-multiparty'); | ||
var path = require('path'); | ||
@@ -65,8 +67,15 @@ | ||
var adapter = new _controller["default"](this, app); | ||
adapter.init(); | ||
app.set('views', path.join(userDir, root)); | ||
app.set('view engine', engine); | ||
app.use(compression()).use(express.json()).use(express.urlencoded({ | ||
if (session !== false) { | ||
app.use(require('./session')(session, log4j)); | ||
} | ||
app.use(multipart({})).use(compression()).use(express.json()).use(express.urlencoded({ | ||
extended: true | ||
})).use(cookieParser()).use(express["static"](path.join(userDir, resource))).use(function (req, res, next) { | ||
})).use(express.text()).use(express.raw()).use(cookieParser()).use(express["static"](path.join(userDir, resource))); | ||
adapter.init(); // 必须声明在use之后 否则未做解析 导致post body无法解析 | ||
app.use(function (req, res, next) { | ||
next(createError(404)); | ||
@@ -94,6 +103,2 @@ }).use(function (err, req, res, next) { | ||
if (session !== false) { | ||
app.use(require('./session')(session, log4j)); | ||
} | ||
var http = require('http'); | ||
@@ -100,0 +105,0 @@ |
{ | ||
"name": "vweb-mvc", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "mvc ", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61450
1518