blob: 86b2fb972f4186878c4b5715ea31a8dd46bc02a4 (
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
|
/**
* 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);
});
|