Module: NYNY::Runner
- Defined in:
- lib/nyny/core-ext/runner.rb
Instance Method Summary collapse
Instance Method Details
#optimal_runner ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/nyny/core-ext/runner.rb', line 3 def optimal_runner return Rack::Handler::WEBrick if RUBY_PLATFORM == 'java' begin Rack::Handler::Thin rescue LoadError Rack::Handler::WEBrick end end |
#run!(port = 9292) ⇒ Object
13 14 15 16 |
# File 'lib/nyny/core-ext/runner.rb', line 13 def run! port=9292 middlewares.unshift Rack::ShowExceptions, Rack::CommonLogger optimal_runner.run new, :Port => port end |