forked from RileyBlue/mapa-turistico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
executable file
·36 lines (31 loc) · 1.04 KB
/
app.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
32
33
34
35
36
'use strict';
var express = require('express'),
path = require('path'),
cfg = require('./app/config').cfg,
passport = require('passport'),
sessionStore = require('./app/sessionStore').create(express);
var app = module.exports = express();
app.configure(function() {
app.set('port', cfg.PORT);
app.set('views', path.join(__dirname, 'app/views'));
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.favicon());
app.use(express.cookieParser());
app.use(express.bodyParser({
uploadDir: '/tmp'
}));
app.use(express.methodOverride());
app.use(express.session({
key : cfg.session.key,
secret: cfg.session.secret,
store : sessionStore
}));
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));
app.use(express.static(path.join(__dirname, 'uploads')));
});
require('./app/auth/twitter')();
require('./app/routers')(app);