Class: Docwu::Server
- Inherits:
-
Object
- Object
- Docwu::Server
- Defined in:
- lib/docwu/server.rb
Class Method Summary collapse
Class Method Details
.process(options = {}, &block) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/docwu/server.rb', line 17 def self.process(={}, &block) ['destination'] ||= ::Docwu.config.deploy_path destination = ['destination'] FileUtils.mkdir_p(destination) staticMe = Rack::Builder.new do run Rack::Directory.new(destination) end pp ::Thin::Server.start(.delete(:Host), .delete(:Port), staticMe, , &block) # Rack::Handler::Thin.run(staticMe, options) # Rack::Handler::WEBrick.run(staticMe, :Port => options['port'], :Host => options['host']) # Rack::Handler::Mongrel.run(staticMe, :Port => options['port'], :Host => options['host']) end |