diff --git a/src/app/api/health/route.ts b/src/app/api/health/route.ts index 9146308..d056717 100644 --- a/src/app/api/health/route.ts +++ b/src/app/api/health/route.ts @@ -1,3 +1,8 @@ +/** + * Handles GET requests for the health endpoint by returning a JSON health-check payload. + * + * @returns A Response whose JSON body is { ok: true }. + */ export async function GET() { return Response.json({ ok: true }); -} +} \ No newline at end of file diff --git a/src/db/index.ts b/src/db/index.ts index 7018a5b..c544c9e 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -1,6 +1,12 @@ import { drizzle } from 'drizzle-orm/postgres-js'; import postgres from 'postgres'; +/** + * Retrieve the DATABASE_URL environment variable. + * + * @returns The `DATABASE_URL` string. + * @throws Error if the `DATABASE_URL` environment variable is not set. + */ function requireDatabaseUrl(): string { const url = process.env.DATABASE_URL; if (!url) throw new Error('DATABASE_URL is required');