Module: Spade::Server
- Defined in:
- lib/spade/server.rb
Defined Under Namespace
Classes: CommandRunner
Class Method Summary collapse
Class Method Details
.run(working, port) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/spade/server.rb', line 8 def self.run(working, port) rootdir = Spade.discover_root(working) static = Rack::Static.new(nil, :urls => ['/'], :root => rootdir) static = CommandRunner.new(static) static = Rack::ShowStatus.new(Rack::ShowExceptions.new(Rack::Chunked.new(Rack::ContentLength.new(static)))) Rack::Handler::WEBrick.run static, :Port => port.to_i end |
.shutdown ⇒ Object
17 18 19 |
# File 'lib/spade/server.rb', line 17 def self.shutdown Rack::Handler::WEBrick.shutdown end |