Skip to content

Instantly share code, notes, and snippets.

@taogawa
Created January 22, 2017 16:32
Show Gist options
  • Save taogawa/54f9f59f5b1bcdc9e143567a15c06ca2 to your computer and use it in GitHub Desktop.
Save taogawa/54f9f59f5b1bcdc9e143567a15c06ca2 to your computer and use it in GitHub Desktop.
小さなrack app

以下のコマンドを実行する

bundle exec rackup
class MinRack
def call(env)
[ 200, { 'Content-Type' => 'text/plain' },
env.keys.sort.map {|k| "#{k} = #{env[k]}\n" }
]
end
end
run MinRack.new
source 'https://rubygems.org'
gem 'rack'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment