A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
refactor: Move the health endpoint to hono as well
Mohamed Bassemf144f1bcc21e
diff --git a/apps/web/app/api/health/route.ts b/apps/web/app/api/health/route.tsdeleted file mode 100644index 8e5326c6..00000000--- a/apps/web/app/api/health/route.ts+++ /dev/null@@ -1,8 +0,0 @@-import { NextRequest, NextResponse } from "next/server";--export const GET = async (_req: NextRequest) => {- return NextResponse.json({- status: "ok",- message: "Web app is working",- });-};diff --git a/packages/api/index.ts b/packages/api/index.tsindex 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.tsnew file mode 100644index 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;