Comparing version 0.3.5 to 0.3.6
@@ -30,2 +30,7 @@ var Express = require('express'), | ||
app.use(function(req, res, next) { | ||
if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Advanced'); | ||
next(); | ||
}); | ||
// 开发环境使用假数据 | ||
@@ -60,2 +65,4 @@ if (Utils.isDev() && Utils.c('isMock')) { | ||
if (!_.startsWith(file, 'config')) return; | ||
// only require js file | ||
if (!_.endsWith(file, '.js')) return; | ||
var config = require(Path.join(configPath, file)); | ||
@@ -62,0 +69,0 @@ // backward for 0.2.10 |
@@ -141,4 +141,4 @@ var _ = require('lodash'), | ||
return function(req, res, next) { | ||
Utils.runControllerByString(path, req, res, next) | ||
} | ||
Utils.runControllerByString(path, req, res, next); | ||
}; | ||
}, | ||
@@ -182,3 +182,3 @@ | ||
if (typeof str === 'string') { | ||
results = str.split('@') | ||
results = str.split('@'); | ||
} | ||
@@ -188,3 +188,3 @@ results[0] || (results[0] = Utils.c('defaultController')); | ||
if (!Utils.runController(results[0], results[1], null, req, res, next)) { | ||
throw new Error('Run controller error: Controller => ' + results[0] + ', Acton => ' + results[1]) | ||
throw new Error('Run controller error: Controller => ' + results[0] + ', Action => ' + results[1]); | ||
} | ||
@@ -304,2 +304,2 @@ }, | ||
return options; | ||
} | ||
} |
{ | ||
"name": "advanced", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "A simple MVC framework based on Express", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
36266
882