-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
25 lines (18 loc) · 596 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
var express = require('express'),
config = require('./config/config');
// glob = require('glob'),
// mongoose = require('mongoose');
/*mongoose.connect(config.db);
var db = mongoose.connection;
db.on('error', function () {
throw new Error('unable to connect to database at ' + config.db);
});
var models = glob.sync(config.root + '/app/models/!*.js');
models.forEach(function (model) {
require(model);
});*/
var app = express();
require('./config/express')(app, config);
app.listen(config.port, function () {
console.log('Express server listening on port ' + config.port);
});