13 lines
222 B
Text
13 lines
222 B
Text
|
# 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
|