Created
July 5, 2019 22:55
-
-
Save keithrbennett/a279c4ae0166cdb004131057fdb13d4c to your computer and use it in GitHub Desktop.
Illustrates one way to output the 'env' hash that Rack produces in a very human readable format.
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
# Illustrates one way to output the 'env' hash that Rack produces in | |
# a very human readable format. | |
# Stored at https://gist.github.com/keithrbennett/a279c4ae0166cdb004131057fdb13d4c. | |
require "rack" | |
require "thin" | |
require 'awesome_print' | |
Rack::Handler::Thin.run(->(env) do | |
[200, { "Content-Type" => "text/html" }, env.ai(html: true)] | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment