Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
report.reset(function(error){
if(error){
logging.error('Failed to reset report document.');
logging.error(error);
return;
}
serverProcess = forever.start(['./bin/lowkick', 'publish', 'test/tmp-config.json'], {
silent: true
});
serverProcess.on('start', function(process, data){
var url = 'http://' + configdoc.server.host + ':' + configdoc.server.port,
startTS = +(new Date);
(function waitServerToStart(){
request.get(url, function(error){
if(error && +(new Date)-startTS
forever.stopAll();
process.exit(1);
});
if (process.argv[3] === "--use-container-ip") {
require('dns').lookup(require('os').hostname(), function (err, addr, fam) {
forever.start('examples/chatWorker/index.js', {
silent: false,
max: 1,
env: {
CHATUP_HOSTNAME: addr
}
});
})
} else {
var workerDaemon = forever.start('examples/chatWorker/index.js', {
silent: false,
max: 1
});
}
process.on('exit', function() {
forever.stopAll();
});
} else {
console.error('First arg should be "dispatcher" or "worker"');
console.error("Got:", process.argv);
process.exit(1);
}
#!/bin/sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
var forever = require('forever');
if (process.argv[2] === "dispatcher") {
forever.start('examples/dispatcher/index.js', {
max: 1
});
} else if (process.argv[2] === "worker") {
var nginxDaemon = forever.start("-c/home/chatup/examples/chatWorker/nginx.conf", {
command: "/usr/local/nginx/sbin/nginx",
max: 1,
silent: false,
logFile: 'nginx.log'
});
nginxDaemon.on('exit', function() {
forever.stopAll();
process.exit(1);
});
if (process.argv[3] === "--use-container-ip") {
require('dns').lookup(require('os').hostname(), function (err, addr, fam) {
forever.start('examples/chatWorker/index.js', {
silent: false,
max: 1,
env: {
#!/bin/sh
':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
var forever = require('forever');
if (process.argv[2] === "dispatcher") {
forever.start('examples/dispatcher/index.js', {
max: 1
});
} else if (process.argv[2] === "worker") {
var nginxDaemon = forever.start("-c/home/chatup/examples/chatWorker/nginx.conf", {
command: "/usr/local/nginx/sbin/nginx",
max: 1,
silent: false,
logFile: 'nginx.log'
});
nginxDaemon.on('exit', function() {
forever.stopAll();
process.exit(1);
});
if (process.argv[3] === "--use-container-ip") {
require('dns').lookup(require('os').hostname(), function (err, addr, fam) {
function start_service(service) {
if (services[service]) {
if (services[service].running) {
zen.send_admin_message(service + ' is already running');
} else {
zen.send_admin_message('starting ' + service);
services[service].start();
}
} else {
zen.send_admin_message('starting ' + service);
child = forever.start([language_map[service.split('.')[1]], service], {
max: 10000,
silent: false
});
forever.startServer(child);
services[service] = child;
forever.cli.list();
}
}
this.start = function() {
if(this.settings.config) {
fs.writeFileSync('./config.hjson', this.settings.config, 'utf8');
}
if (this.settings.forever.enabled) {
forever.load(this.settings.forever.options);
that.pid = forever.start('./start.js');
}
else {
that.proc = runScript('./start.js', function (err) {
if (err) throw err;
});
}
};
exec: function() {
forever.start(masterScript, foreverOptions).on('start', function() {
logger.warn('fds start successed , you can use startDeamon to start with daemon , not supported windows');
});
}
},
var forever = require('forever');
var child = forever.start([ 'socketstream', 'start' ], {
max : 1,
silent : true
});
forever.startServer(child);
var path = require('path')
var forever = require('forever')
forever.start(path.join(__dirname, 'run.js'), {'uid': 'glnotify'})