add api healthcheck
This commit is contained in:
parent
c83769e6e0
commit
54831e55d4
2
fly.toml
2
fly.toml
@ -21,7 +21,7 @@ primary_region = 'ord'
|
|||||||
timeout = '5s'
|
timeout = '5s'
|
||||||
grace_period = '10s'
|
grace_period = '10s'
|
||||||
method = 'GET'
|
method = 'GET'
|
||||||
path = '/'
|
path = '/api/healthcheck'
|
||||||
|
|
||||||
[[vm]]
|
[[vm]]
|
||||||
memory = '256MB'
|
memory = '256MB'
|
||||||
|
12
src/pages/api/healthcheck.ts
Normal file
12
src/pages/api/healthcheck.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import type { NextApiRequest, NextApiResponse } from "next";
|
||||||
|
|
||||||
|
type ResponseData = {
|
||||||
|
status: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function handler(
|
||||||
|
_: NextApiRequest,
|
||||||
|
res: NextApiResponse<ResponseData>
|
||||||
|
) {
|
||||||
|
res.status(200).json({ status: "ok" });
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user