From f0f6ad382db2fbd7f2fa2e35a74deba46ac09747 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 18 Sep 2015 09:22:07 -0700 Subject: [PATCH 1/4] Upgrade to express 4. --- package.json | 4 +++- src/app.coffee | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0553055..f2b654e 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,16 @@ "prepublish": "grunt coffee" }, "dependencies": { + "body-parser": "^1.14.0", "decompress-zip": "0.0.4", "dirty": "0.9.7", - "express": "3.x", + "express": "^4.13.3", "formidable": "~1.0.14", "fs-plus": "0.10.0", "github-releases": "0.1.x", "glob": "3.x", "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}" From fded039c01b5cd2758d612b27ee3f8370fc8b74e Mon Sep 17 00:00:00 2001 From: chocoladisco Date: Mon, 27 Feb 2017 16:47:40 +0100 Subject: [PATCH 2/4] added some scripts to make automatic deploys easier --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0553055..d28244b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,9 @@ "mini-breakpad-server": "bin/mini-breakpad-server" }, "scripts": { - "prepublish": "grunt coffee" + "prepublish": "grunt coffee", + "postinstall": "grunt", + "start": "node lib/app.js" }, "dependencies": { "decompress-zip": "0.0.4", @@ -16,6 +18,7 @@ "fs-plus": "0.10.0", "github-releases": "0.1.x", "glob": "3.x", + "grunt": "^0.4.5", "jade": "~0.35.0", "minidump": "0.3.0", "mkdirp": "~0.3.5", From cc4a1f7b3d20ab2cfca0af13a17bcf447bd626b0 Mon Sep 17 00:00:00 2001 From: chocoladisco Date: Mon, 27 Feb 2017 16:58:07 +0100 Subject: [PATCH 3/4] updated versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f311464..2cdb06d 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ "start": "node lib/app.js" }, "dependencies": { - "body-parser": "^1.14.0", + "body-parser": "^1.16.1", "decompress-zip": "0.0.4", "dirty": "0.9.7", - "express": "^4.13.3", + "express": "^4.14.1", "formidable": "~1.0.14", "fs-plus": "0.10.0", "github-releases": "0.1.x", From e9bf23295ebc37b9e93a0f4386e9e4156c252e3a Mon Sep 17 00:00:00 2001 From: chocoladisco Date: Mon, 27 Feb 2017 17:00:07 +0100 Subject: [PATCH 4/4] added express-json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 2cdb06d..d298a50 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "decompress-zip": "0.0.4", "dirty": "0.9.7", "express": "^4.14.1", + "express-json": "^1.0.0", "formidable": "~1.0.14", "fs-plus": "0.10.0", "github-releases": "0.1.x",