Spaces:
Paused
Paused
Download server/src/routes/api-docs.ts from GraziePrego/agent: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/spaces/GraziePrego/agent/resolve/main/server/src/routes/api-docs.ts
- Command line
-
hf download hf://spaces/GraziePrego/agent/server/src/routes/api-docs.ts
-
curl -L -o api-docs.ts https://huggingface.co/spaces/GraziePrego/agent/resolve/main/server/src/routes/api-docs.ts
507 Bytes
| import { Router } from "express"; | |
| export function apiDocsRoutes() { | |
| const router = Router(); | |
| router.get("/", (req, res) => { | |
| res.json({ | |
| endpoints: [ | |
| { | |
| method: "GET", | |
| path: "/health", | |
| purpose: "Returns HTTP 200 when the app is ready and provides health information." | |
| }, | |
| { | |
| method: "GET", | |
| path: "/api-docs", | |
| purpose: "Documents all available API endpoints." | |
| } | |
| ] | |
| }); | |
| }); | |
| return router; | |
| } | |