diff --git a/app.rb b/app.rb index a4fff89..77fb14e 100644 --- a/app.rb +++ b/app.rb @@ -210,6 +210,12 @@ get "/" do "hello there!\n" end +get "/env", provides: "json" do + return JSON.pretty_generate ENV.sort.to_h if params.key? "pretty" + + JSON.generate ENV.sort.to_h +end + get "/env" do stream do |out| ENV.sort.each do |k, v|