Skip to content

Commit

Permalink
add health check endpoint to test app
Browse files Browse the repository at this point in the history
  • Loading branch information
swiknaba committed Mar 9, 2024
1 parent 583cdaf commit 463c4b0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions spec/test_app/app/controllers/health.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# typed: strict
# frozen_string_literal: true

module Controllers
class Health < Kirei::BaseController
extend T::Sig

sig { returns(Kirei::Middleware::RackResponseType) }
def livez
puts(params.inspect)
render(status: 200, body: "OK")
end
end
end
12 changes: 6 additions & 6 deletions spec/test_app/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# frozen_string_literal: true

Kirei::Router.add_routes([
# Route.new(
# verb: "GET",
# path: "/livez",
# controller: Controllers::HealthController,
# action: "livez",
# ),
Kirei::Router::Route.new(
verb: "GET",
path: "/livez",
controller: Controllers::Health,
action: "livez",
),
Kirei::Router::Route.new(
verb: "GET",
path: "/airports",
Expand Down

0 comments on commit 463c4b0

Please sign in to comment.