Skip to content

Commit f24a486

Browse files
committed
add health endpoing
1 parent 183d3cc commit f24a486

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/controllers/application_controller.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ class ApplicationController < ActionController::Base
44
def home
55
render "/home"
66
end
7+
8+
def health
9+
Doc.count
10+
expires_now
11+
head :ok
12+
end
713
end

config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@
1919
get ":sitemap", sitemap: /sitemap[A-Za-z\d.]*/, to: redirect { "https://#{ENV.fetch "CLOUDFLARE_R2_BUCKET_URL"}#{_2.path}" }
2020

2121
root "application#home"
22+
23+
get :health, controller: "application"
2224
end

0 commit comments

Comments
 (0)