Download src/routes/base.route.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/routes/base.route.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/routes/base.route.ts
-
curl -L -o base.route.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/routes/base.route.ts
555 Bytes
| import { getServerNotifications } from "@/controllers/serverDataOnlyController.js"; | |
| import { Router } from "express"; | |
| const baseRouter = Router(); | |
| baseRouter.get("/", (_req, res) => { | |
| res.status(200).json({ | |
| status: "ok", | |
| service: "lynfera-backend", | |
| ip: { reqIp: _req.ip }, | |
| }); | |
| return; | |
| }); | |
| baseRouter.get("/health", (_req, res) => { | |
| res.status(200).json({ | |
| success: true, | |
| message: "API is healthy", | |
| timestamp: new Date().toISOString(), | |
| }); | |
| }); | |
| baseRouter.get("/server-notifications", getServerNotifications); | |
| export default baseRouter; | |