aboutsummaryrefslogtreecommitdiffstats
path: root/packages/api
diff options
context:
space:
mode:
Diffstat (limited to 'packages/api')
-rw-r--r--packages/api/index.ts2
-rw-r--r--packages/api/routes/health.ts16
2 files changed, 18 insertions, 0 deletions
diff --git a/packages/api/index.ts b/packages/api/index.ts
index ab7cdbe2..2eb22d8f 100644
--- a/packages/api/index.ts
+++ b/packages/api/index.ts
@@ -7,6 +7,7 @@ import { Context } from "@karakeep/trpc";
import trpcAdapter from "./middlewares/trpcAdapter";
import assets from "./routes/assets";
import bookmarks from "./routes/bookmarks";
+import health from "./routes/health";
import highlights from "./routes/highlights";
import lists from "./routes/lists";
import publicRoute from "./routes/public";
@@ -44,6 +45,7 @@ const app = new Hono<{
await next();
})
.use(trpcAdapter)
+ .route("/health", health)
.route("/trpc", trpc)
.route("/v1", v1)
.route("/assets", assets)
diff --git a/packages/api/routes/health.ts b/packages/api/routes/health.ts
new file mode 100644
index 00000000..64c2d45b
--- /dev/null
+++ b/packages/api/routes/health.ts
@@ -0,0 +1,16 @@
+import { Hono } from "hono";
+
+import { Context } from "@karakeep/trpc";
+
+const health = new Hono<{
+ Variables: {
+ ctx: Context;
+ };
+}>().get("/", (c) => {
+ return c.json({
+ status: "ok",
+ message: "Web app is working",
+ });
+});
+
+export default health;