aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-04-29 12:52:46 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-04-29 12:52:46 +0200
commitaf4934a97f7a57ae6288760fe8a4110bb1f8a556 (patch)
tree0f96022bf3a75ccf8f115187a950d9fcb88958d4 /app.js
parentremoved file (diff)
downloadDivid-af4934a97f7a57ae6288760fe8a4110bb1f8a556.tar.gz
added a few comments
Diffstat (limited to '')
-rw-r--r--app.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/app.js b/app.js
index 414372b..f9aa1b9 100644
--- a/app.js
+++ b/app.js
@@ -3,17 +3,17 @@
* Module dependencies.
*/
var express = require('express')
- , fs = require('fs')
- , passport = require('passport');
+ , fs = require('fs')
+ , passport = require('passport')
+ , mongoose = require('mongoose');
/**
* App configuration
*/
-var port = process.env.PORT || 8001
+var port = process.env.PORT || 8000
, env = process.env.NODE_ENV || 'development'
, config = require('./config/config')[env]
- , auth = require('./config/middlewares/authorization')
- , mongoose = require('mongoose');
+ , auth = require('./config/middlewares/authorization');
// Bootstrap db connection
mongoose.connect(config.db);
@@ -24,6 +24,7 @@ db.once('open', function callback(){
});
// Bootstrap models
+// This gets all model files in ./models
var models_path = __dirname + '/models';
fs.readdirSync(models_path).forEach( function(file) {
require(models_path + '/' + file);