Skip to content
This repository
Browse code

Merge pull request #285 from whitepaperclip/master

Feature: --bind server to IP address
  • Loading branch information...
commit dd86e30f8082828359f22430a1cbd4bae6513b93 2 parents 3900a2b + 588b266
Matthew Eernisse authored December 20, 2012
2  bin/cli.js
@@ -36,6 +36,7 @@ usage = [
36 36
   , ''
37 37
   , 'Options:'
38 38
   , '  --environment, -e   Environment to use'
  39
+  , '  --bind, -b          IP to bind the server to (default: localhost)'
39 40
   , '  --port, -p          Port to connect to'
40 41
   , '  --workers, -w       Number of worker processes to start (default: 1)'
41 42
   , '  --debug, -d         Sets the log level to output debug messages to'
@@ -86,6 +87,7 @@ usage = [
86 87
 // Options available
87 88
 optsMap = [
88 89
     { full: 'origins', abbr: 'o' }
  90
+  , { full: 'bind', abbr: 'b' }
89 91
   , { full: 'port', abbr: 'p' }
90 92
   , { full: 'workers', abbr: ['n', 'w'] }
91 93
   , { full: 'version', abbr: ['v', 'V'], args: false }
7  lib/config.js
@@ -34,6 +34,13 @@ config = new (function () {
34 34
       baseConfig.rotateWorkers = false;
35 35
     }
36 36
 
  37
+    // The configuration key "bind" should be used to supply
  38
+    // the hostname. We should consider deprecating "hostname"
  39
+    // in favor of "bind".
  40
+    if (opts.bind && !opts.hostname) {
  41
+        opts.hostname = opts.bind;
  42
+    }
  43
+
37 44
     // App configs
38 45
     for (var i = 0; i < dirList.length; i++) {
39 46
       fileName = dirList[i];
3  tutorial.md
Source Rendered
@@ -41,6 +41,7 @@ the help dialog.
41 41
 #### Options:
42 42
 
43 43
 -   `--environment`, `-e`: Environment to use
  44
+-   `--bind`, `-b`: IP to bind the server to (default: localhost)
44 45
 -   `--port`, `-p`: Port to connect server to
45 46
 -   `--workers`, `-w`: Number of workers to use (default: 1)
46 47
 -   `--debug`, `-d`: Sets the log level to output debug messages to
@@ -677,4 +678,4 @@ could do:
677 678
     (hint, check out `config/router.js`)
678 679
 -   Add some logging with `geddy.log`
679 680
 -   Configure mongo, riak or postgress and use it instead of the memory
680  
-    modelAdapter. See how easy it's to switch
  681
+    modelAdapter. See how easy it's to switch

0 notes on commit dd86e30

Please sign in to comment.
Something went wrong with that request. Please try again.