1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

add host option

This commit is contained in:
Thomas Reynolds 2011-11-23 22:05:53 -08:00
parent 00271c1cee
commit 37053c812b
2 changed files with 8 additions and 0 deletions

View file

@ -163,6 +163,7 @@ module Middleman
def start_server(options={})
opts = {
:Port => options[:port] || 4567,
:Host => options[:host] || "0.0.0.0",
:AccessLog => []
}

View file

@ -53,6 +53,12 @@ module Middleman
:aliases => "-e",
:default => ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development',
:desc => "The environment Middleman will run under"
method_option :host,
:type => :string,
:aliases => "-h",
# :required => true,
:default => "0.0.0.0",
:desc => "Bind to HOST address"
method_option "port",
:aliases => "-p",
:default => "4567",
@ -64,6 +70,7 @@ module Middleman
def server
params = {
:port => options["port"],
:host => options["host"],
:environment => options["environment"],
:debug => options["debug"]
}