summaryrefslogtreecommitdiff
path: root/spec/rack_servers/configs/config.ru
blob: 63daeb9eec538a566ba27e319d2bf62d0aa9a5bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

app = proc do |env|
  if env['REQUEST_METHOD'] == 'GET'
    [200, {}, ["#{Process.pid}"]]
  else
    Process.kill(env['QUERY_STRING'], Process.pid)
    [200, {}, ['Bye!']]
  end
end

run app