summary refs log tree commit diff
path: root/src/api/routes/-/healthz.ts
blob: d9d1c026f1f760ab393369ebeb960a7a245d33c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { Router, Response, Request } from "express";
import { route } from "@fosscord/api";
import { getDatabase } from "@fosscord/util";

const router = Router();

router.get("/", route({}), (req: Request, res: Response) => {
	if (!getDatabase()) return res.sendStatus(503);

	return res.sendStatus(200);
});

export default router;