Permalink
Browse files

Worked around issue with newer express.

When passing a host to `app.listen`, `app.address()` returns null.
Investigate this matter further. Showing NaN for now.
  • Loading branch information...
1 parent a883832 commit a38d2f1d9c43045e32c1379dd7640bc5a3c6e92a @mauricemach mauricemach committed Nov 22, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 docs/zappa.html
  2. +1 −1 src/zappa.coffee
View
2 docs/zappa.html
@@ -339,7 +339,7 @@
<span class="k">else</span> <span class="nx">app</span><span class="p">.</span><span class="nx">listen</span> <span class="nx">port</span>
<span class="nx">log</span> <span class="s1">&#39;Express server listening on port %d in %s mode&#39;</span><span class="p">,</span>
- <span class="nx">app</span><span class="p">.</span><span class="nx">address</span><span class="p">().</span><span class="nx">port</span><span class="p">,</span> <span class="nx">app</span><span class="p">.</span><span class="nx">settings</span><span class="p">.</span><span class="nx">env</span>
+ <span class="nx">app</span><span class="p">.</span><span class="nx">address</span><span class="p">()</span><span class="o">?</span><span class="p">.</span><span class="nx">port</span><span class="p">,</span> <span class="nx">app</span><span class="p">.</span><span class="nx">settings</span><span class="p">.</span><span class="nx">env</span>
<span class="nx">log</span> <span class="s2">&quot;Zappa #{zappa.version} \&quot;#{codename}\&quot; orchestrating the show&quot;</span>
View
2 src/zappa.coffee
@@ -417,7 +417,7 @@ zappa.run = ->
else app.listen port
log 'Express server listening on port %d in %s mode',
- app.address().port, app.settings.env
+ app.address()?.port, app.settings.env
log "Zappa #{zappa.version} \"#{codename}\" orchestrating the show"

0 comments on commit a38d2f1

Please sign in to comment.