feat(articles): moved articles over to the main server
This commit is contained in:
@@ -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")),
|
||||
|
||||
Reference in New Issue
Block a user