diff --git a/package.json b/package.json index 7fe2940..6c3f221 100644 --- a/package.json +++ b/package.json @@ -21,21 +21,21 @@ "url": "git://github.com/azproduction/plato-as-service.git" }, "dependencies" : { - "tmp": "*", - "plato": "*", - "unzip": "*", - "request": "*", - "vow": "*", - "vow-fs": "*", - "susanin": "*", - "rm-r": "*", - "glob": "*", - "mkdirp": "*", - "ignore": "*", - "fstream": "*", - "express": "*", - "lodash": "*", - "socket.io": "*" + "tmp": "~0.0.24", + "plato": "~1.3.0", + "unzip": "~0.1.11", + "request": "~2.51.0", + "vow": "~0.3.0", + "vow-fs": "~0.2.0", + "susanin": "~1.0.0", + "rm-r": "~1.0.2", + "glob": "~4.3.5", + "mkdirp": "~0.5.0", + "ignore": "~2.2.15", + "fstream": "~1.0.3", + "express": "~3.19.0", + "lodash": "~2.4.1", + "socket.io": "~1.3.2" }, "main": "server", "devDependencies" : { @@ -43,19 +43,18 @@ "mocha": "1.11.0", "jscs": "1.0.0", "istanbul": "0.1.39", - "chai": "*", - "mocha-istanbul": "*", - "coveralls": "*", - "supertest": "*", - - "bower": "*", - "grunt": "*", - "grunt-cli": "*", - "grunt-contrib-watch": "*", - "grunt-contrib-concat": "*", - "grunt-csso": "*", - "grunt-concurrent": "*", - "load-grunt-tasks": "*" + "chai": "~1.10.0", + "mocha-istanbul": "~0.2.0", + "coveralls": "~2.11.2", + "supertest": "~0.15.0", + "bower": "~1.3.12", + "grunt": "~0.4.5", + "grunt-cli": "~0.1.13", + "grunt-contrib-watch": "~0.6.1", + "grunt-contrib-concat": "~0.5.0", + "grunt-csso": "~0.7.0", + "grunt-concurrent": "~1.0.0", + "load-grunt-tasks": "~2.0.0" }, "scripts": { "postinstall": "./node_modules/.bin/bower install && ./node_modules/.bin/grunt", diff --git a/server/index.js b/server/index.js index 534ad25..4cce65f 100644 --- a/server/index.js +++ b/server/index.js @@ -25,8 +25,10 @@ module.exports = function (reportSettings) { var server = require('http').createServer(app); + var isDevelopment = app.get('env') === 'development'; + var io = require('socket.io').listen(server, { - log: app.get('env') === 'development' + log: isDevelopment }); app.locals({ @@ -34,10 +36,10 @@ module.exports = function (reportSettings) { requestQueue: new Limiter(reportSettings.maxConcurrent, reportSettings.maxConcurrentQueue) }); - app.configure('development', function(){ + if (isDevelopment) { app.use(express.errorHandler()); app.use(express.logger('dev')); - }); + } router(app, io);