diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 3d65a10..8114cd8 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -10,6 +10,7 @@ import { allWorkers } from '$lib/server/bullmq/BullMQ'; import { DatabaseConnected } from '$lib/server/prisma'; const handleAPIRoute: Handle = async ({ event, resolve }) => { + if (event.route.id === '/(api)/health') return resolve(event); const [success, res] = await tryVerifyAPIToken(event); if (!success) { return res; diff --git a/src/routes/(api)/health/+server.ts b/src/routes/(api)/health/+server.ts new file mode 100644 index 0000000..fd5abbc --- /dev/null +++ b/src/routes/(api)/health/+server.ts @@ -0,0 +1,6 @@ +import type { RequestHandler } from './$types'; + +// GET health +export const GET: RequestHandler = async () => { + return new Response(null, { status: 200 }); +};