-
Notifications
You must be signed in to change notification settings - Fork 174
/
app.js
executable file
·35 lines (26 loc) · 835 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
33
34
35
'use strict';
/**
* Module dependencies.
*/
var express = require('express');
var fs = require('fs');
/**
* Main application entry file.
* Please note that the order of loading is important.
*/
// Load Configurations
var config = require('./config/config');
var winston = require('./config/winston');
winston.info('Starting '+config.app.name+'...');
winston.info('Config loaded: '+config.NODE_ENV);
winston.debug('Accepted Config:',config);
var db = require('./config/sequelize');
var passport = require('./config/passport');
var app = express();
//Initialize Express
require('./config/express')(app, passport);
//Start the app by listening on <port>
app.listen(config.PORT);
winston.info('Express app started on port ' + config.PORT);
//expose app
module.exports = app;