forked from antcrawl/mean-kiss-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
39 lines (32 loc) · 862 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
36
37
38
39
'use strict';
/**
* Module dependencies.
*/
var init = require('./config/init')(),
config = require('./config/config'),
mongoose = require('mongoose');
/**
* Main application entry file.
* Please note that the order of loading is important.
*/
/*
var express = require('express'),
routes = require('./routes'),
path = require('path');
*/
// Bootstrap db connection
var db = mongoose.connect(config.db);
/* var app = express();
app.directory = __dirname;
require('./config/environments')(app);
require('./routes')(app);
module.exports = app;
*/
// Init the express application
var app = require('./config/express')(db);
// Start the app by listening on <port>
app.listen(config.port);
// Expose app
exports = module.exports = app;
// Logging initialization
console.log('Mean-kiss-boilerplate application started on port ' + config.port);