Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import type { NextApiRequest, NextApiResponse } from 'next'
export interface ReadyzApiResponse {
status: 'UP'
uptime: string
}
/**
* An API endpoint to be used in kubernetes readyness checks.
*/
export default function handler(
_req: NextApiRequest,
res: NextApiResponse<ReadyzApiResponse>
) {
res.status(200).json({
status: 'UP',
uptime: `${process.uptime()}s`,
})
}
|