Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server setup via command-line arguments or environment arguments #8

Merged
merged 5 commits into from Jan 9, 2017

Conversation

Projects
None yet
2 participants
@PavloKovalov
Copy link
Contributor

commented Jan 9, 2017

馃

@ai

This comment has been minimized.

Copy link
Member

commented Jan 9, 2017

Looks good. I will look closer in next few hours.

@@ -71,6 +71,17 @@ if (app.env === 'production') {
}
```

### Use console arguments or environment variables to redefine options

This comment has been minimized.

Copy link
@ai

ai Jan 9, 2017

Member

No environment variables in docs and --help :)

var yargs = require('yargs')
.option('h', {
alias: 'host',
describe: 'IP-address to bind server',

This comment has been minimized.

Copy link
@ai

ai Jan 9, 2017

Member

Host is not equal to IP-address. 0.0.0.0 is not valid IP-address :).

This comment has been minimized.

Copy link
@PavloKovalov

PavloKovalov Jan 9, 2017

Author Contributor

Took description from JSDoc of BaseServer#listen

})
.option('c', {
alias: 'cert',
describe: 'SSL certificate or path to it',

This comment has been minimized.

Copy link
@ai

ai Jan 9, 2017

Member

In CLI you can鈥檛 set file content directly. You will set path anyway.

@@ -41,9 +41,19 @@ function createReporter (test) {
})
}

function envCleanup () {

This comment has been minimized.

Copy link
@ai

ai Jan 9, 2017

Member

You don鈥檛 need function to use it only once :)

README.md Outdated
@@ -71,6 +71,17 @@ if (app.env === 'production') {
}
```

### Use console arguments or environment variables to redefine options
```sh
$ node base-server.js --help

This comment has been minimized.

Copy link
@ai

ai Jan 9, 2017

Member

There is no base-server.js. You call it with server.js --help.

@ai

This comment has been minimized.

Copy link
Member

commented Jan 9, 2017

Great. Thanks for fixes.

@ai ai merged commit fce014d into logux:master Jan 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.