Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 588b266524262ca6d925c54479f39dae770f65a1 1 parent 2508d27
Nick Kezhaya whitepaperclip authored
Showing with 11 additions and 1 deletion.
  1. +2 −0  bin/cli.js
  2. +7 −0 lib/config.js
  3. +2 −1  tutorial.md
2  bin/cli.js
View
@@ -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 }
7 lib/config.js
View
@@ -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];
3  tutorial.md
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.