Files
hanzo.ai/app/api/oss/stats/route.ts

19 lines
420 B
TypeScript

import { NextResponse } from 'next/server'
import ossStats from '@/lib/data/oss-stats.json' with { type: 'json' }
export const revalidate = 3600 // Hourly cache
export async function GET() {
return NextResponse.json(
{
...ossStats,
servedAt: new Date().toISOString(),
},
{
headers: {
'Cache-Control': 'public, s-maxage=3600, stale-while-revalidate=86400',
},
},
)
}