From 6144ea3aeb7289ad5d828fe445d304f22ebbc7b1 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Tue, 3 Mar 2015 13:55:14 +0000 Subject: [PATCH] Update to express ^4.0.0 --- package.json | 3 ++- src/api.coffee | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 78bde45a..614e505d 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,11 @@ "JSONStream": "^0.10.0", "blinking": "~0.0.2", "bluebird": "^2.6.0", + "body-parser": "^1.12.0", "coffee-script": "~1.9.1", "dockerode": "~2.0.0", "event-stream": "^3.0.20", - "express": "~3.2.6", + "express": "^4.0.0", "knex": "~0.7.3", "lodash": "^3.0.0", "mixpanel": "0.0.20", diff --git a/src/api.coffee b/src/api.coffee index 07eab026..6a2c9f66 100644 --- a/src/api.coffee +++ b/src/api.coffee @@ -1,14 +1,15 @@ Promise = require 'bluebird' fs = Promise.promisifyAll require 'fs' utils = require './utils' -express = require 'express' application = require './application' tty = require './lib/tty' knex = require './db' +express = require 'express' +bodyParser = require 'body-parser' module.exports = (secret) -> api = express() - api.use(express.bodyParser()) + api.use(bodyParser()) api.use (req, res, next) -> if req.query.apikey is secret next()