-b (--bind) takes in the IP to bind the server to.

This commit is contained in:
Nick Kezhaya
2012-12-16 15:33:32 -06:00
parent 2508d27ab7
commit 588b266524
3 changed files with 11 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ usage = [
, ''
, 'Options:'
, ' --environment, -e Environment to use'
, ' --bind, -b IP to bind the server to (default: localhost)'
, ' --port, -p Port to connect to'
, ' --workers, -w Number of worker processes to start (default: 1)'
, ' --debug, -d Sets the log level to output debug messages to'
@@ -82,6 +83,7 @@ usage = [
// Options available
optsMap = [
{ full: 'origins', abbr: 'o' }
, { full: 'bind', abbr: 'b' }
, { full: 'port', abbr: 'p' }
, { full: 'workers', abbr: ['n', 'w'] }
, { full: 'version', abbr: ['v', 'V'], args: false }

View File

@@ -34,6 +34,13 @@ config = new (function () {
baseConfig.rotateWorkers = false;
}
// The configuration key "bind" should be used to supply
// the hostname. We should consider deprecating "hostname"
// in favor of "bind".
if (opts.bind && !opts.hostname) {
opts.hostname = opts.bind;
}
// App configs
for (var i = 0; i < dirList.length; i++) {
fileName = dirList[i];

View File

@@ -41,6 +41,7 @@ the help dialog.
#### Options:
- `--environment`, `-e`: Environment to use
- `--bind`, `-b`: IP to bind the server to (default: localhost)
- `--port`, `-p`: Port to connect server to
- `--workers`, `-w`: Number of workers to use (default: 1)
- `--debug`, `-d`: Sets the log level to output debug messages to
@@ -677,4 +678,4 @@ could do:
(hint, check out `config/router.js`)
- Add some logging with `geddy.log`
- Configure mongo, riak or postgress and use it instead of the memory
modelAdapter. See how easy it's to switch
modelAdapter. See how easy it's to switch