aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-04-18 13:34:38 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-04-18 13:34:38 +0200
commit6eb150af06ccb6a2de817d7f5783814e90ca765b (patch)
tree3d1b7e591679b6be16f06253b26d97334be18bf8 /app.js
parentFix minor bug (diff)
downloadDivid-6eb150af06ccb6a2de817d7f5783814e90ca765b.tar.gz
changing to passport-local
Diffstat (limited to 'app.js')
-rw-r--r--app.js14
1 files changed, 10 insertions, 4 deletions
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'));
});
+
+
+