diff --git a/.eslintrc b/.eslintrc index 93a91a3..5350f37 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,7 +8,6 @@ "rules": { "no-underscore-dangle": 0, - "global-strict": [2, "always"], "quotes": [2, "single"], "strict": [2, "global"], diff --git a/package.json b/package.json index efb6432..2b9b9ab 100644 --- a/package.json +++ b/package.json @@ -17,47 +17,49 @@ "npm": "2.x.x" }, "dependencies": { - "babel": "^5.6.14", - "babelify": "^6.1.2", - "bcryptjs": "^2.1.0", - "boom": "^2.8.0", + "babel": "^5.8.23", + "babelify": "^6.3.0", + "bcryptjs": "^2.3.0", + "boom": "^2.9.0", "bootstrap": "3.3.5", - "brfs": "^1.4.0", - "colonizers-client": "^0.0.6", - "colonizers-core": "^0.0.6", + "brfs": "^1.4.1", + "colonizers-client": "^0.0.7", + "colonizers-core": "^0.0.7", "component-emitter": "^1.2.0", - "good": "^6.2.0", - "good-console": "^5.0.2", - "handlebars": "^3.0.3", - "hapi": "^8.6.1", - "hapi-auth-basic": "^2.0.0", - "hapi-auth-cookie": "^3.0.1", + "good": "^6.4.0", + "good-console": "^5.1.0", + "handlebars": "^4.0.3", + "hapi": "^10.3.0", + "hapi-auth-basic": "^3.0.0", + "hapi-auth-cookie": "^3.1.0", "hapi-browserify": "^0.0.4", - "hapi-context-credentials": "^1.0.0", - "hapi-io": "^0.0.7", - "hoek": "^2.14.0", - "joi": "^6.5.0", + "hapi-context-credentials": "^2.0.0", + "hapi-io": "^0.0.11", + "hoek": "^2.16.3", + "inert": "^3.0.2", + "joi": "^6.8.1", "jquery": "2.1.4", "knockout": "3.3.0", - "lout": "^6.2.2", - "moment": "2.10.3", - "mongoose": "~4.0.6", + "lout": "^7.2.0", + "moment": "2.10.6", + "mongoose": "~4.1.9", "node-uuid": "^1.4.3", "rabbus": "^0.4.3", - "socket.io": "1.3.5", - "socket.io-client": "^1.3.5", - "sweetalert": "^1.0.1", + "socket.io": "1.3.7", + "socket.io-client": "^1.3.7", + "sweetalert": "^1.1.0", "underscore": "1.8.3", + "vision": "^3.0.0", "wascally": "^0.2.7" }, "devDependencies": { - "code": "^1.4.0", + "code": "^1.5.0", "gulp": "^3.9.0", "gulp-concat": "^2.6.0", - "gulp-insert": "^0.4.0", + "gulp-insert": "^0.5.0", "gulp-less": "^3.0.3", - "gulp-replace": "^0.5.3", + "gulp-replace": "^0.5.4", "jasny-bootstrap": "git://github.com/jasny/bootstrap#v3.1.3", - "lab": "^5.11.1" + "lab": "^6.1.0" } } diff --git a/server/auth.js b/server/auth.js index cd4705b..6cef53c 100644 --- a/server/auth.js +++ b/server/auth.js @@ -36,7 +36,7 @@ exports.register = function(server, options, next) { }); server.auth.strategy('basic', 'basic', { - validateFunc: function(username, password, callback) { + validateFunc: function(request, username, password, callback) { findSession({_id: username, token: password}, callback); } }); diff --git a/server/index.js b/server/index.js index 8fd276d..35e1e7d 100644 --- a/server/index.js +++ b/server/index.js @@ -1,6 +1,8 @@ 'use strict'; -require('babel/register'); +require('babel/register')({ + ignore: [/node_modules(?!.*colonizers)/] +}); var Hapi = require('hapi'); var views = require('./views'); @@ -22,6 +24,12 @@ server.connection({ }); var plugins = [ + { + register: require('inert') + }, + { + register: require('vision') + }, { register: require('good'), options: { @@ -141,13 +149,13 @@ var plugins = [ } ]; -views(server, isProd); - server.register(plugins, function(err) { if (err) { return console.error('Failed to load a plugin:', err); } + views(server, isProd); + server.start(function() { console.log('Server running at:', server.info.uri); });