diff --git a/package.json b/package.json index 0553055..d298a50 100644 --- a/package.json +++ b/package.json @@ -6,17 +6,23 @@ "mini-breakpad-server": "bin/mini-breakpad-server" }, "scripts": { - "prepublish": "grunt coffee" + "prepublish": "grunt coffee", + "postinstall": "grunt", + "start": "node lib/app.js" }, "dependencies": { + "body-parser": "^1.16.1", "decompress-zip": "0.0.4", "dirty": "0.9.7", - "express": "3.x", + "express": "^4.14.1", + "express-json": "^1.0.0", "formidable": "~1.0.14", "fs-plus": "0.10.0", "github-releases": "0.1.x", "glob": "3.x", + "grunt": "^0.4.5", "jade": "~0.35.0", + "method-override": "^2.3.5", "minidump": "0.3.0", "mkdirp": "~0.3.5", "node-uuid": "~1.4.1", diff --git a/src/app.coffee b/src/app.coffee index 05a2b0d..d1e1c5a 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -1,3 +1,5 @@ +bodyParser = require 'body-parser' +methodOverride = require('method-override') path = require 'path' express = require 'express' reader = require './reader' @@ -16,10 +18,9 @@ db.on 'load', -> app.set 'views', path.resolve(__dirname, '..', 'views') app.set 'view engine', 'jade' -app.use express.json() -app.use express.urlencoded() -app.use express.methodOverride() -app.use app.router +app.use bodyParser.json() +app.use bodyParser.urlencoded({extended: true}) +app.use methodOverride() app.use (err, req, res, next) -> res.send 500, "Bad things happened:
#{err.message}"