Permalink
Browse files

Updates to work with MeanIO 0.9.0 config-module

Also gitignore the webpack output
  • Loading branch information...
1 parent d2228ba commit 0f5094fd385906fd075f3c247466d91bac3ff11f @ADSKLowenthal ADSKLowenthal committed Apr 13, 2016
Showing with 7 additions and 2 deletions.
  1. +3 −0 .gitignore
  2. 0 config/env/{all.js → default.js}
  3. +1 −1 config/express.js
  4. +3 −1 server.js
View
@@ -72,3 +72,6 @@ modules/views/
# vim Files
# --------------------
*.swp
+
+#webpack
+/bundle
File renamed without changes.
View
@@ -12,7 +12,7 @@ var mean = require('meanio'),
flash = require('connect-flash'),
modRewrite = require('connect-modrewrite'),
// seo = require('mean-seo'),
- config = mean.loadConfig(),
+ config = mean.getConfig(),
bodyParser = require('body-parser');
module.exports = function(app, db) {
View
@@ -8,6 +8,8 @@ console.log = function(){
};
*/
+process.env.NODE_CONFIG_DIR = './config/env';
+
// Requires meanio .
var mean = require('meanio');
var cluster = require('cluster');
@@ -50,7 +52,7 @@ if ((cluster.isMaster) &&
}
// Creates and serves mean application
mean.serve({ workerid: workerId /* more options placeholder*/ }, function (app) {
- var config = app.config.clean;
+ var config = app.getConfig();
var port = config.https && config.https.port ? config.https.port : config.http.port;
console.log('Mean app started on port ' + port + ' (' + process.env.NODE_ENV + ') cluster.worker.id:', workerId);

0 comments on commit 0f5094f

Please sign in to comment.