diff options
author | Lurifax <stianalexanderolsen@gmail.com> | 2013-04-29 14:49:39 +0200 |
---|---|---|
committer | Lurifax <stianalexanderolsen@gmail.com> | 2013-04-29 14:49:39 +0200 |
commit | e0a8e93d0e691c3939a121f65e87dece50f6d97d (patch) | |
tree | 263cd285ca4b06c7c13cc6f92e3cf7739be9bfc1 /app.js | |
parent | Merge branch 'master' of github.com:dennisse/Divid (diff) | |
parent | been working on the project model and posting projects (diff) | |
download | Divid-e0a8e93d0e691c3939a121f65e87dece50f6d97d.tar.gz |
Merge branch 'master' of github.com:dennisse/Divid
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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); |