From 43a3a99738cd9b9610c68d005fcd9ac17d640c67 Mon Sep 17 00:00:00 2001 From: DaInfLoop Date: Sat, 13 Jul 2024 18:45:53 +0100 Subject: [PATCH] add status path to indicate gen is up --- index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.ts b/index.ts index 69e28ae..914287a 100644 --- a/index.ts +++ b/index.ts @@ -153,6 +153,10 @@ const server = createServer(async (req, res) => { const url = new URL(req.url!, "https://loc.al"); + if (req.method == "GET" && url.pathname == "/status") { + return res.end("OK") + } + if (req.method == "GET" && url.pathname == "/battler.png") { console.log(`Generating battler`) const opts = Object.fromEntries(