chore: add health endpoint
This commit is contained in:
18
src/pages/api/health.ts
Normal file
18
src/pages/api/health.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { APIRoute } from 'astro'
|
||||
|
||||
// Served on demand so it always reflects the live server, never a build-time snapshot.
|
||||
export const prerender = false
|
||||
|
||||
export const GET: APIRoute = () => {
|
||||
const body = {
|
||||
status: 'ok',
|
||||
}
|
||||
|
||||
return new Response(JSON.stringify(body), {
|
||||
status: 200,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Cache-Control': 'no-store',
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user