Update express dependency
This commit is contained in:
parent
c2ba55ac0f
commit
5f7adc98ba
|
@ -9,6 +9,8 @@ var $util = require("../utilities");
|
|||
var Logger = require("../logger");
|
||||
var Config = require("../config");
|
||||
var db = require("../database");
|
||||
var bodyParser = require("body-parser");
|
||||
var cookieParser = require("cookie-parser");
|
||||
|
||||
var httplog = new Logger.Logger(path.join(__dirname, "..", "..", "http.log"));
|
||||
|
||||
|
@ -257,13 +259,13 @@ function static(dir) {
|
|||
return;
|
||||
}
|
||||
|
||||
res.sendfile(req.path.replace(/^\//, ""), {
|
||||
res.sendFile(req.path.replace(/^\//, ""), {
|
||||
maxAge: Config.get("http.cache-ttl") * 1000,
|
||||
root: dir
|
||||
}, function (err) {
|
||||
logRequest(req);
|
||||
if (err) {
|
||||
res.send(err.status);
|
||||
res.status(err.status).end();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
|
@ -278,9 +280,8 @@ module.exports = {
|
|||
* Initializes webserver callbacks
|
||||
*/
|
||||
init: function (app) {
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded());
|
||||
app.use(express.cookieParser());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
app.use(cookieParser());
|
||||
|
||||
if (Config.get("http.minify")) {
|
||||
var cache = path.join(__dirname, "..", "..", "www", "cache")
|
||||
|
|
20
package.json
20
package.json
|
@ -7,17 +7,19 @@
|
|||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "~3.4.8",
|
||||
"bcrypt": "~0.7.7",
|
||||
"mysql": "~2.0.1",
|
||||
"jade": "~1.1.5",
|
||||
"socket.io": "~0.9.16",
|
||||
"nodemailer": "~0.6.0",
|
||||
"body-parser": "^1.6.5",
|
||||
"cookie": "~0.1.0",
|
||||
"yamljs": "~0.1.4",
|
||||
"express-minify": "0.0.7",
|
||||
"q": "^1.0.0",
|
||||
"cookie-parser": "^1.3.2",
|
||||
"express": "^4.8.5",
|
||||
"express-minify": "0.0.11",
|
||||
"jade": "~1.1.5",
|
||||
"json-typecheck": "^0.1.0",
|
||||
"oauth": "^0.9.11"
|
||||
"mysql": "~2.0.1",
|
||||
"nodemailer": "~0.6.0",
|
||||
"oauth": "^0.9.11",
|
||||
"q": "^1.0.0",
|
||||
"socket.io": "~0.9.16",
|
||||
"yamljs": "~0.1.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue