We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdef2a5 commit 6d8ccfcCopy full SHA for 6d8ccfc
1 file changed
src/index.ts
@@ -27,6 +27,7 @@ export default {
27
return json({
28
message: "Cloudflare Workers skeleton",
29
routes: [
30
+ "/health",
31
"/hello",
32
"/api",
33
"/request (POST)",
@@ -41,6 +42,10 @@ export default {
41
42
});
43
}
44
45
+ if (path === "/health") {
46
+ return json({ status: "ok", timestamp: new Date().toISOString() });
47
+ }
48
+
49
if (path.startsWith("/hello")) return handleHello(request, env);
50
if (path.startsWith("/api")) return handleApi(request, env);
51
if (path.startsWith("/mcp")) return handleMcp(request, env);
0 commit comments