Sha256: 73f6e88c7a4d80690c43677d6975501e4048da849248ee8af0309fd5d5757f29

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module NYNY
  module Runner
    def optimal_runner
      return Rack::Handler::WEBrick if RUBY_PLATFORM == 'java'

      begin
        Rack::Handler::Thin
      rescue LoadError
        Rack::Handler::WEBrick
      end
    end

    def run! port=9292
      use Rack::CommonLogger
      use Rack::ShowExceptions unless NYNY.env.production?
      optimal_runner.run new, :Port => port
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nyny-3.0.1 lib/nyny/core-ext/runner.rb