Merge branch 'development' of github.com:Unitech/pm2 into development

This commit is contained in:
Unitech 2016-07-30 09:59:41 -07:00
commit a3e0dfb798
3 changed files with 6 additions and 5 deletions

View File

@ -470,9 +470,9 @@ commander.command('link [secret_key|command] [public_key] [machine_name]')
// Web interface
//
commander.command('web')
.description('launch a health API on port ' + cst.WEB_INTERFACE)
.description('launch a health API on ' + cst.WEB_IPADDR + ':' + cst.WEB_PORT)
.action(function() {
console.log('Launching web interface on port ' + cst.WEB_INTERFACE);
console.log('Launching web interface on ' + cst.WEB_IPADDR + ':' + cst.WEB_PORT);
pm2.web();
});

View File

@ -72,7 +72,8 @@ var csts = {
})(),
DEBUG : process.env.PM2_DEBUG || false,
WEB_INTERFACE : parseInt(process.env.PM2_API_PORT) || 9615,
WEB_IPADDR : process.env.PM2_API_IPADDR || '0.0.0.0',
WEB_PORT : parseInt(process.env.PM2_API_PORT) || 9615,
MODIFY_REQUIRE : process.env.PM2_MODIFY_REQUIRE || false,
WORKER_INTERVAL : process.env.PM2_WORKER_INTERVAL || 30000,

View File

@ -58,8 +58,8 @@ function startWebServer(pm2) {
res.write(JSON.stringify({err : '404'}));
return res.end();
}
}).listen(cst.WEB_INTERFACE, function() {
console.log('Web interface listening on port %s', cst.WEB_INTERFACE);
}).listen(cst.WEB_PORT, cst.WEB_IPADDR, function() {
console.log('Web interface listening on %s:%s', cst.WEB_IPADDR, cst.WEB_PORT);
});
}