diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-26 11:25:57 +0100 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-03-26 11:25:57 +0100 |
commit | b2f37bdcb03d93a80254f58694f8047d3c35b9bb (patch) | |
tree | dcb79d880376490de8074d249bb67ed471b60629 /app.js | |
parent | old commit (diff) | |
download | Divid-b2f37bdcb03d93a80254f58694f8047d3c35b9bb.tar.gz |
changed the way the app handles routes. now everything goes straight to
router.js, insted of being partially handled in app.js
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -4,8 +4,6 @@ */ var express = require('express') - , routes = require('./routes') - , user = require('./routes/user') , http = require('http') , path = require('path'); @@ -27,6 +25,8 @@ app.configure(function(){ app.use(express.favicon()); // sets favicon app.use(express.logger('dev')); app.use(express.bodyParser()); + app.use(express.cookieParser()); + app.use(express.session({ secret: 'lsdrghoi4hgqio42nqf2uqi32f3bilu23fl23b' })); app.use(express.methodOverride()); app.use(app.router); app.use(express.static(path.join(__dirname, 'public'))); @@ -41,12 +41,7 @@ app.configure('development', function(){ * Routes */ -app.get('/', routes.index); -app.get('/login', routes.login); -app.get('/users', user.list); - - - +require('./routes/router')(app); |