Merge pull request #90 from Amialc/master

dependencies update (jade renamed to pug)
This commit is contained in:
José F. Romaniello 2016-06-21 14:34:55 +02:00 committed by GitHub
commit b1c674017f
4 changed files with 10 additions and 11 deletions

View File

@ -1,5 +1,5 @@
var express = require('express'); var express = require('express');
var app=express(); var app = express();
var http = require('http').Server(app); var http = require('http').Server(app);
var io = require('socket.io')(http); var io = require('socket.io')(http);
var socketioJwt = require('socketio-jwt'); var socketioJwt = require('socketio-jwt');
@ -13,7 +13,7 @@ var env = {
}; };
app.set('views', __dirname + '/views'); app.set('views', __dirname + '/views');
app.set('view engine', 'jade'); app.set('view engine', 'pug');
io io
.on('connection', socketioJwt.authorize({ .on('connection', socketioJwt.authorize({
@ -27,9 +27,9 @@ io
io.emit('chat message', msg); io.emit('chat message', msg);
}); });
}); });
app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/public'));
app.get('/', function (req, res) { app.get('/', function (req, res) {
res.render('index', { env: env }); res.render('index', { env: env });
}); });
@ -37,4 +37,3 @@ app.get('/', function (req, res) {
http.listen(3001, function(){ http.listen(3001, function(){
console.log('listening on *:3001'); console.log('listening on *:3001');
}); });

View File

@ -6,10 +6,10 @@
"author": "Auth0", "author": "Auth0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"dotenv": "^1.2.0", "dotenv": "^2.0.0",
"express": "^4.13.3", "express": "^4.13.4",
"jade": "^1.11.0", "pug": "^2.0.0-beta2",
"socket.io": "^1.3.7", "socket.io": "^1.4.6",
"socketio-jwt": "^4.3.3" "socketio-jwt": "^4.3.3"
} }
} }

View File

@ -1,9 +1,9 @@
extends layout extends layout
block content block content
script(src="https://cdn.auth0.com/js/lock-9.0.min.js") script(src="https://cdn.auth0.com/js/lock-9.2.min.js")
script(src="/socket.io/socket.io.js") script(src="/socket.io/socket.io.js")
script(src="http://code.jquery.com/jquery-1.11.3.js") script(src="http://code.jquery.com/jquery-1.12.4.js")
div#login div#login