mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 22:51:37 +00:00
started moving content to corretn divs
This commit is contained in:
8
app.js
8
app.js
@@ -11,7 +11,7 @@ var app = express();
|
||||
var dbURL = 'mongodb://localhost/database';
|
||||
var db = require('mongoose').connect(dbURL);
|
||||
var qs = require('qs');
|
||||
|
||||
var MongoStore = require('connect-mongo')(express);
|
||||
|
||||
// Configuration
|
||||
app.configure(function(){
|
||||
@@ -22,7 +22,11 @@ app.configure(function(){
|
||||
app.use(express.cookieParser('my secret string'));
|
||||
app.use(express.session({
|
||||
secret: 'my secret string',
|
||||
maxAge: 3600000
|
||||
maxAge: 3600000,
|
||||
store: new MongoStore({
|
||||
db: 'sessions',
|
||||
url: dbURL
|
||||
})
|
||||
}));
|
||||
app.use(function(req, res, next){
|
||||
res.locals.session = req.session;
|
||||
|
||||
Reference in New Issue
Block a user