belgattitude/httpx

View on GitHub
examples/nextjs-app/src/app/api/health/route.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { type NextRequest, NextResponse } from 'next/server';

export const dynamic = 'force-dynamic';

export async function GET(_req: NextRequest) {
  return NextResponse.json(
    {
      time: new Date().toISOString(),
    },
    {
      status: 200,
    }
  );
}