Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created July 5, 2019 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithrbennett/a279c4ae0166cdb004131057fdb13d4c to your computer and use it in GitHub Desktop.
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.
# 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