feat(articles): moved articles over to the main server

This commit is contained in:
2025-11-01 00:06:54 -05:00
parent 00ef72de90
commit 2a6eafa19a
4 changed files with 493 additions and 16 deletions

View File

@@ -11,7 +11,30 @@ import { checkBuildUpdate } from "../utlis/checkForBuild.js";
const router = Router();
// GET /health
/**
* @openapi
* /health:
* get:
* summary: Health check for the API server
* description: Returns basic system stats including memory usage, uptime, and build info.
* responses:
* 200:
* description: OK
* content:
* application/json:
* schema:
* type: object
* properties:
* status:
* type: string
* example: ok
* uptime:
* type: number
* build:
* type: string
* memoryUsage:
* type: string
*/
router.get("/", async (req, res) => {
const { data, error } = await tryCatch(
db.select().from(serverStats).where(eq(serverStats.id, "serverStats")),