Merge branch 'wonderdogone-master'

This commit is contained in:
José F. Romaniello 2015-08-31 11:09:51 -03:00
commit 51bfe18d72
4 changed files with 12 additions and 14 deletions

View File

@ -9,10 +9,11 @@ var jwt_secret = 'foo bar big secret';
var app = express(); var app = express();
app.configure(function(){ var serveStatic = require('serve-static');
this.use(express.json()); var bodyParser = require('body-parser');
this.use(express.static(__dirname + '/public'));
}); app.use(serveStatic('public', {'index': ['index.html']}));
app.use(bodyParser.json());
app.post('/login', function (req, res) { app.post('/login', function (req, res) {
var profile = { var profile = {

View File

@ -26,11 +26,12 @@
"xtend": "~2.1.2" "xtend": "~2.1.2"
}, },
"devDependencies": { "devDependencies": {
"connect": "~2.7.11", "body-parser": "~1.13.3",
"express": "~3.1.2", "express": "~4.10.6",
"mocha": "~1.17.0", "mocha": "~1.17.0",
"passport-local": "~0.1.6", "passport-local": "~0.1.6",
"request": "~2.19.0", "request": "~2.19.0",
"serve-static": "^1.7.1",
"server-destroy": "~1.0.1", "server-destroy": "~1.0.1",
"should": "~1.2.2", "should": "~1.2.2",
"socket.io": "^1.0.4", "socket.io": "^1.0.4",

View File

@ -7,6 +7,7 @@ var socketio_jwt = require('../../lib');
var jwt = require('jsonwebtoken'); var jwt = require('jsonwebtoken');
var xtend = require('xtend'); var xtend = require('xtend');
var bodyParser = require('body-parser');
var server, sio; var server, sio;
var enableDestroy = require('server-destroy'); var enableDestroy = require('server-destroy');
@ -26,10 +27,7 @@ exports.start = function (options, callback) {
var app = express(); var app = express();
app.configure(function(){ app.use(bodyParser.json());
this.use(express.json());
this.use(express.urlencoded());
});
app.post('/login', function (req, res) { app.post('/login', function (req, res) {
var profile = { var profile = {

View File

@ -7,6 +7,7 @@ var socketio_jwt = require('../../lib');
var jwt = require('jsonwebtoken'); var jwt = require('jsonwebtoken');
var xtend = require('xtend'); var xtend = require('xtend');
var bodyParser = require('body-parser');
var server, sio; var server, sio;
var enableDestroy = require('server-destroy'); var enableDestroy = require('server-destroy');
@ -26,10 +27,7 @@ exports.start = function (callback) {
var app = express(); var app = express();
app.configure(function(){ app.use(bodyParser.json());
this.use(express.json());
this.use(express.urlencoded());
});
app.post('/login', function (req, res) { app.post('/login', function (req, res) {
var profile = { var profile = {