From a23a71b162c1c72979f7aa53d2efd82b2990b2fc Mon Sep 17 00:00:00 2001 From: lion-rion Date: Wed, 15 Nov 2023 23:32:22 +0900 Subject: [PATCH] Add health check endpoint to main.py --- linebot/opt/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linebot/opt/main.py b/linebot/opt/main.py index 38e644b..63d3290 100644 --- a/linebot/opt/main.py +++ b/linebot/opt/main.py @@ -45,6 +45,11 @@ def callback(): return "OK" +@app.route("/health", methods=["POST"]) +def health(): + return "200 OK" + + @handler.add(FollowEvent) # FollowEventをimportするのを忘れずに! def follow_message(event): # event: LineMessagingAPIで定義されるリクエストボディ # print(event)