Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Ability to run wintersmith preview over a specific domain #26

merged 1 commit into from

2 participants


I was integrating livefyre into my wintersmith-based site, and run into issues with the domain my preview version was being served over. I wanted to preview it over the production domain on my local machine (using my hosts file to make my production domain temporarily resolve to my local machine), so that livefyre would function and I could test the integration.

I made a minor change so that you can use -d or --domain switches within the wintersmith preview command to define a specific domain / host over which the local server would run.

Initially I started out with -h and --host, but that conflicted with -h for --help...

@jnordberg jnordberg merged commit 29690ad into from

Looks good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +4 −0 src/cli/
  2. +1 −1  src/
4 src/cli/
@@ -11,6 +11,7 @@ usage = """
-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 =
alias: 'p'
default: 8080
+ domain:
+ alias: 'd'
+ default: 'localhost'
extend options, commonOptions
2  src/
@@ -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 "server running on: #{ serverUrl }"
module.exports = setup
Something went wrong with that request. Please try again.