Permalink
Browse files

v6.59.1. Bugfix.

- v6.59.1 December 19, 2013
	- Fixed listening on heroku (regression since v6.58.2)
  • Loading branch information...
1 parent 8f8944c commit 896d0b57d672b4cc359be3d41db6a3062c5265e9 @balupton balupton committed Dec 19, 2013
Showing with 16 additions and 11 deletions.
  1. +3 −0 HISTORY.md
  2. +1 −1 locale/en.cson
  3. +1 −1 package.json
  4. +11 −9 src/lib/docpad.coffee
View
@@ -1,5 +1,8 @@
# History
+- v6.59.1 December 19, 2013
+ - Fixed listening on heroku (regression since v6.58.2)
+
- v6.59.0 December 19, 2013
- Removed the previously deprecated `ensureFile`, `ensureDocument`, `ensureModel`/`ensureFileOrDocument` methods, use `addFile`, `addDocument`, and `addModel` instead
- Improved watching, should hopefully fix [#738](https://github.com/bevry/docpad/issues/738), [#742](https://github.com/bevry/docpad/issues/742), [#739](https://github.com/bevry/docpad/issues/739)
View
@@ -45,7 +45,7 @@
# Server
serverInUse: "Could not start the web server, chances are the desired port %s is already in use"
- serverStart: "Starting server on port %s and directory %s"
+ serverStart: "Starting server on hostname %s port %s directory %s"
serverStarted: "DocPad listening to %s on directory %s"
# Watching
View
@@ -1,7 +1,7 @@
{
"title": "DocPad. Streamlined web development.",
"name": "docpad",
- "version": "6.59.0",
+ "version": "6.59.1",
"description": "DocPad is a next generation web architecture that lets you create fast static websites with dynamic abilities and powerful abstractions. Write your website as files on your computer, entries in a database, or even RSS feeds and DocPad will import it, generate & render it, then output a static website for deployment anywhere or a dynamic node website for advanced server-side functionality. Use it as a module or standalone. It's purely awesome. Check it out.",
"homepage": "http://docpad.org",
"installUrl": "http://docpad.org/install",
View
@@ -908,15 +908,17 @@ class DocPad extends EventEmitterGrouped
# Port
# The port that the server should use
- # PORT - Heroku, Nodejitsu, Custom
- # VCAP_APP_PORT - AppFog
- # VMC_APP_PORT - CloudFoundry
+ # Defaults to these environment variables:
+ # - PORT — Heroku, Nodejitsu, Custom
+ # - VCAP_APP_PORT — AppFog
+ # - VMC_APP_PORT — CloudFoundry
port: null
# Hostname
- # The hostname we want to listen on, which if null
- # will be localhost, but we could specify 0.0.0.0 if we
- # want to open up things
+ # The hostname we wish to listen to
+ # Defaults to these environment variables:
+ # HOSTNAME — Generic
+ # Do not set to "localhost" it does not work on heroku
hostname: null
# Max Age
@@ -1079,7 +1081,7 @@ class DocPad extends EventEmitterGrouped
# Get the Hostname
getHostname: ->
- return @getConfig().hostname ? process.env.HOSTNAME ? "localhost"
+ return @getConfig().hostname ? process.env.HOSTNAME ? null
# =================================
@@ -4676,11 +4678,11 @@ class DocPad extends EventEmitterGrouped
return complete(err)
# Listen
- docpad.log 'debug', util.format(locale.serverStart, port, config.outPath)
+ docpad.log 'debug', util.format(locale.serverStart, hostname, port, config.outPath)
opts.serverHttp.listen port, hostname, ->
# Log
address = opts.serverHttp.address()
- serverHostname = if address.address is '127.0.0.1' then 'localhost' else address.address
+ serverHostname = address.address
serverPort = address.port
serverLocation = "http://#{serverHostname}:#{serverPort}/"
docpad.log 'info', util.format(locale.serverStarted, serverLocation, config.outPath)

0 comments on commit 896d0b5

Please sign in to comment.