-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.js
31 lines (28 loc) · 912 Bytes
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var express = require('express'),
MongoStore = require('connect-mongodb'),
everyauth = require('everyauth');
exports.boot = function (app) {
'use strict';
app.configure(function () {
app.use(express.static(__dirname + '/public'));
app.set('views', __dirname + '/app/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(express.session({
secret: config.session.secret,
store: new MongoStore({
url: config.db.url,
collection : 'sessions'
})
}));
app.use(mongooseAuth.middleware());
});
app.configure('development', function () {
app.use(express.errorHandler({
dumpExceptions: true,
showStack: true
}));
});
};