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:
parent
00271c1cee
commit
37053c812b
2 changed files with 8 additions and 0 deletions
|
@ -163,6 +163,7 @@ module Middleman
|
|||
def start_server(options={})
|
||||
opts = {
|
||||
:Port => options[:port] || 4567,
|
||||
:Host => options[:host] || "0.0.0.0",
|
||||
:AccessLog => []
|
||||
}
|
||||
|
||||
|
|
|
@ -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"]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue