Created
December 5, 2009 01:49
-
-
Save kevwil/249506 to your computer and use it in GitHub Desktop.
setup for @app.call errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder = Rack::Builder.new do | |
use Rack::CommonLogger | |
use Rack::Lint | |
use Rack::ShowExceptions | |
lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } | |
use Rack::Lint | |
end | |
@app = builder.to_app | |
# pass app to server, server calls app and gets response | |
status, headers, body = @app.call(env) | |
# ^ will be one of the used Rack:: classes, not 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment