Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Adding configuration file handling, updating yaml-config-loader depen…
Browse files Browse the repository at this point in the history
…dency.
  • Loading branch information
tizzo committed Nov 4, 2014
1 parent 5167921 commit 909fb2c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bin/penelope
Expand Up @@ -28,7 +28,6 @@ var argv = yargs
.default('name', false)
.describe('port', 'If specified, a port to listen on for control commands.')
.alias('port', 'p')
.default('port', false)
.describe('keep-alive', 'Keep the server alive even if all processes have closed, useful if you are going to be restarting services.')
.alias('keep-alive', 'k')
.default('keep-alive', false)
Expand Down Expand Up @@ -67,12 +66,14 @@ if (argv.keepAlive) {
runner.closeStreamWithLastProcess = false;
}

if (argv.port) {
argv.log = console.log;
server(runner, argv);
}

loader.add('/etc/penelope.yaml');
loader.add(process.env['HOME'] + '/.penelope.yaml');
loader.add(argv);
loader.load(function(error, config) {
if (config.port) {
config.log = console.log;
server(runner, config);
}
var i = null;
for (i in commands) {
var command = commands[i];
Expand Down

0 comments on commit 909fb2c

Please sign in to comment.