diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-18 13:34:38 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-18 13:34:38 +0200 |
commit | 6eb150af06ccb6a2de817d7f5783814e90ca765b (patch) | |
tree | 3d1b7e591679b6be16f06253b26d97334be18bf8 /app.js | |
parent | Fix minor bug (diff) | |
download | Divid-6eb150af06ccb6a2de817d7f5783814e90ca765b.tar.gz |
changing to passport-local
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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')); }); + + + |