forked from cidadedemocratica/pushingtogether
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
33 lines (25 loc) · 762 Bytes
/
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
/*!
* pushing together
* GNU 3.0 Licensed
*/
'use strict';
var router = require('./config/routes.js');
var express = require('express');
var passport = require('passport');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var morgan = require('morgan');
var app = express();
var base = "/api/v1";
require('./config/passport')(passport);
app.use(morgan('dev'));
app.use(cookieParser());
app.use(bodyParser());
app.use(session({ secret: 'ilovemadrid' }));
app.use(passport.initialize());
app.use(passport.session());
router(app, base, passport);
app.listen(process.env.PT_PORT, function () {
console.log('Pushing Together listening on port '+process.env.PT_PORT+'!');
});