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
7 8 9 10 11 12 13 14 |
# File 'lib/spade/server.rb', line 7 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(static)) Rack::Handler::WEBrick.run static, :Port => port.to_i end |
.shutdown ⇒ Object
16 17 18 |
# File 'lib/spade/server.rb', line 16 def self.shutdown Rack::Handler::WEBrick.shutdown end |