added /_cat/pid
All checks were successful
Gitea Actions Demo / lint (push) Successful in 26s
Gitea Actions Demo / test (push) Successful in 15s
Gitea Actions Demo / release-image (push) Has been skipped

This commit is contained in:
Ryan Cavicchioni 2025-03-25 18:49:49 -05:00
parent 312e570a02
commit 2b7b338742
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg

8
app.rb
View File

@ -470,6 +470,14 @@ get "/_cat/config" do
end
end
get "/_cat/pid" do
stream do |out|
{ppid: ppid, pid: Process.pid}.sort.each do |k, v|
out << "#{k}=#{v}\n"
end
end
end
route :delete, :get, :patch, :post, :put, "/status/:code" do
# hello
code = Integer(params[:code])