Add docker healthcheck route

This commit is contained in:
Benjamin Toby 2024-10-04 21:43:03 +01:00
parent 68b82bffc4
commit 9a11e746e7

30
pages/api/healthcheck.ts Normal file
View File

@ -0,0 +1,30 @@
import { NextApiRequest, NextApiResponse } from "next";
/**
* ==============================================================================
* Imports
* ==============================================================================
*/
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* API handler
* ==============================================================================
* @type {import("next").NextApiHandler}
*/
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (req.method !== "GET") return res.json({ msg: "Failed!" });
res.json({
success: true,
});
}