Skip to content

Commit

Permalink
Gave option to select Rack web server.
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbert committed Feb 20, 2012
1 parent b0d5c11 commit f47612a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/staticmatic/configuration.rb
@@ -1,5 +1,6 @@
module StaticMatic
class Configuration
attr_accessor :preview_server
attr_accessor :preview_server_host
attr_accessor :preview_server_port

Expand All @@ -10,6 +11,7 @@ class Configuration
attr_accessor :reverse_ext_mappings

def initialize
self.preview_server = Rack::Handler::WEBrick
self.preview_server_host = "localhost"
self.preview_server_port = 4000

Expand Down
2 changes: 1 addition & 1 deletion lib/staticmatic/server.rb
Expand Up @@ -60,7 +60,7 @@ def self.start(staticmatic)
run StaticMatic::Server.new(staticmatic)
end

Rack::Handler::WEBrick.run(app, :Port => port, :Host => host)
staticmatic.configuration.preview_server.run(app, :Port => port, :Host => host)
end

end
Expand Down

0 comments on commit f47612a

Please sign in to comment.