Permalink
Browse files

Merge pull request #26 from smebberson/7bb54923377ca1cbea87c2b633a091…

…26622c796a

Ability to run wintersmith preview over a specific domain
  • Loading branch information...
2 parents 0a25af5 + 7bb5492 commit 29690ada1eb91b66506a75f70426a269542f51bf @jnordberg committed Jul 3, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −0 src/cli/preview.coffee
  2. +1 −1 src/server.coffee
View
@@ -11,6 +11,7 @@ usage = """
options:
-p, --port [port] port to run server on (defaults to 8080)
+ -d, --domain [domain] host to run server on (defaults to localhost)
#{ commonUsage }
all options can also be set in the config file
@@ -26,6 +27,9 @@ options =
port:
alias: 'p'
default: 8080
+ domain:
+ alias: 'd'
+ default: 'localhost'
extend options, commonOptions
View
@@ -81,7 +81,7 @@ run = (options) ->
http = require 'http'
server = http.createServer setup options
server.listen options.port
- serverUrl = "http://localhost:#{ options.port }/".bold
+ serverUrl = "http://#{ options.domain }:#{ options.port }/".bold
logger.info "server running on: #{ serverUrl }"
module.exports = setup

0 comments on commit 29690ad

Please sign in to comment.