diff --git a/fly.toml b/fly.toml index 581599e..6e76609 100644 --- a/fly.toml +++ b/fly.toml @@ -21,7 +21,7 @@ primary_region = 'ord' timeout = '5s' grace_period = '10s' method = 'GET' - path = '/' + path = '/api/healthcheck' [[vm]] memory = '256MB' diff --git a/src/pages/api/healthcheck.ts b/src/pages/api/healthcheck.ts new file mode 100644 index 0000000..5eba477 --- /dev/null +++ b/src/pages/api/healthcheck.ts @@ -0,0 +1,12 @@ +import type { NextApiRequest, NextApiResponse } from "next"; + +type ResponseData = { + status: string; +}; + +export default function handler( + _: NextApiRequest, + res: NextApiResponse +) { + res.status(200).json({ status: "ok" }); +}