Skip to content
Browse files

Added the ability to run winter smith preview, over a specific host/d…

…omain
  • Loading branch information...
1 parent 0a25af5 commit 7bb54923377ca1cbea87c2b633a09126622c796a @smebberson committed
Showing with 5 additions and 1 deletion.
  1. +4 −0 src/cli/preview.coffee
  2. +1 −1 src/server.coffee
View
4 src/cli/preview.coffee
@@ -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
2 src/server.coffee
@@ -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 7bb5492

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