2
0

🧑‍💻 Add healthcheck API endpoints on all apps (#1563)

fixes #1555
This commit is contained in:
kunal_ingawale
2024-06-11 22:35:12 +05:30
committed by GitHub
parent 2e322c5acc
commit 24db6c5693
6 changed files with 37 additions and 1 deletions

View File

@ -25,6 +25,14 @@ const nextConfig = {
},
]
},
async rewrites() {
return [
{
source: '/healthz',
destination: '/api/health',
},
]
},
}
export default nextConfig

View File

@ -0,0 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next'
export default function handler(req: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ status: 'ok', timestamp: new Date().toISOString() })
}