1065f8ce7a
This allows us (and others) to test drive Puma without it affecting all users. Puma can be enabled by setting the environment variable "EXPERIMENTAL_PUMA" to a non empty value.
12 lines
222 B
Ruby
12 lines
222 B
Ruby
# 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
|