From caf732a04cd6dfc73e96a1ee25a0d1b7ff645281 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 6 Jun 2014 14:57:20 +0200 Subject: [PATCH] Express.js update. --- package.json | 4 +++- server/app.js | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5078a82..ed0af42 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "license": "MIT", "dependencies": {}, "devDependencies": { - "express": "~3.6.0", + "body-parser": "~1.3.0", + "compression": "~1.0.6", + "express": "~4.4.1", "glob": "~4.0.2", "grunt": "~0.4.1", "grunt-autoprefixer": "~0.7.4", diff --git a/server/app.js b/server/app.js index 1cf7694..c25d7c3 100644 --- a/server/app.js +++ b/server/app.js @@ -2,13 +2,16 @@ angular.module('ffffng').factory('app', function (fs) { var express = require('express'); + var bodyParser = require('body-parser'); + var compress = require('compression'); + var app = express(); - app.use(express.bodyParser()); + app.use(bodyParser()); var clientDir = __dirname + '/../client'; - app.use(express.compress()); + app.use(compress()); app.use('/', express.static(clientDir + '/')); app.get('/', function (req, res, next) { fs.readFile(clientDir + '/index.html', 'utf8', function (err, body) {