mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
feat: initial addition of a healthz, readyz and metrics route
This commit is contained in:
parent
a7c628d7f1
commit
d5057ab888
10
api/src/routes/-/healthz.ts
Normal file
10
api/src/routes/-/healthz.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/", route({}), (req: Request, res: Response) => {
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
export default router;
|
10
api/src/routes/-/metrics.ts
Normal file
10
api/src/routes/-/metrics.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/", route({}), (req: Request, res: Response) => {
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
export default router;
|
10
api/src/routes/-/readyz.ts
Normal file
10
api/src/routes/-/readyz.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/", route({}), (req: Request, res: Response) => {
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Reference in New Issue
Block a user