From 6eb150af06ccb6a2de817d7f5783814e90ca765b Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 18 Apr 2013 13:34:38 +0200 Subject: changing to passport-local --- app.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'app.js') diff --git a/app.js b/app.js index 5bf2796..3247fc5 100644 --- a/app.js +++ b/app.js @@ -4,8 +4,9 @@ */ var express = require('express') - , http = require('http') - , path = require('path'); + , path = require('path') + , bcrypt = require('bcrypt') + , passport = require('passport'); var app = express(); // initiates express @@ -30,6 +31,8 @@ app.configure(function(){ app.use(express.methodOverride()); app.use(require('less-middleware')({ src: __dirname + '/public' })); app.use(express.static(path.join(__dirname, 'public'))); + app.use(passport.initialize()); + app.use(passport.session()); }); app.configure('development', function(){ @@ -50,6 +53,9 @@ require('./router')(app); * Server initiation */ -http.createServer(app).listen(app.get('port'), function(){ - console.log("Express server listening on port " + app.get('port')); +app.listen(app.get('port'), function() { + console.log("Express server listening on port " + app.get('port')); }); + + + -- cgit v1.2.3