Skip to content

Commit

Permalink
after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
andrija-hers committed Dec 18, 2014
2 parents be7f0b7 + dc93e27 commit 2347245
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ module.exports = function(grunt) {
// For Heroku users only.
// Docs: https://github.com/linnovate/mean/wiki/Deploying-on-Heroku
grunt.registerTask('heroku:production', ['cssmin', 'uglify']);
};
};
12 changes: 7 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var cluster = require('cluster');
if ((cluster.isMaster) && (process.execArgv.indexOf('--debug') < 0) && (process.env.NODE_ENV!=='test') && (process.execArgv.indexOf('--singleProcess')<0)) {
//if (cluster.isMaster) {

console.log('for real!');
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;

Expand All @@ -43,9 +44,10 @@ if ((cluster.isMaster) && (process.execArgv.indexOf('--debug') < 0) && (process.
{
workerId = cluster.worker.id;
}
mean.serve({ workerid: workerId /* more options placeholder*/ }, function (app) {
var config = app.config.clean;
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);
});
// Creates and serves mean application
mean.serve({ workerid: workerId /* more options placeholder*/ }, function (app) {
var config = app.config.clean;
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 2347245

Please sign in to comment.