aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.js
blob: c292af98b67c5c1c014958467ea251eeb19cb0b3 (plain) (blame)
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
37
38
39
40
41
42
43
44
45
46

/**
 * Module dependencies.
 */

var express = require('express')
  , path = require('path')
  , passport = require('passport');


var app = express(); // initiates express

/**
 * App configuration
 */
var port = process.env.PORT || 3000
  , env = process.env.NODE_ENV || 'development'
  , config = require('./config/config')[env];



/**
 * Express
 */
var app = express();
// express settings
require('./config/express')(app, config, passport);


/**
 * Routes
 */
require('./router')(app, config);



/**
 * Server initiation
 */

app.listen(port, function() {
    console.log("Express server listening on port " + port);
});