Deploy to VPS / deploy (push) Failing after 1m43s
- Added new dependencies for Next.js and lucide-react in pnpm-workspace.yaml. - Refactored DashboardPage component to improve readability and error handling. - Enhanced Header component to display error status with an alert icon. - Updated MobileTabBar and Sidebar components to use a centralized tabs definition. - Improved ChannelsView in dashboard-panel to handle channel fetching more cleanly. - Fixed ActiveSpeaker type to use camelCase for userId. - Updated MessagesPanel to handle guildId checks more gracefully. - Adjusted API calls in dashboard and messages to align with backend expectations. - Refined type definitions across various interfaces for consistency and clarity.
21 lines
617 B
TypeScript
21 lines
617 B
TypeScript
import type { Router } from "express";
|
|
import express from "express";
|
|
import { collectDefaultMetrics } from "prom-client";
|
|
import { handleHealthCheck, handleMetrics } from "./health.controller.js";
|
|
|
|
// Initialize default Node.js runtime metrics (event loop lag, memory, GC, etc.)
|
|
// Called once at module load, not per-request.
|
|
collectDefaultMetrics();
|
|
|
|
export function createHealthRouter(): Router {
|
|
const router = express.Router();
|
|
|
|
// GET /api/health
|
|
router.get("/health", handleHealthCheck);
|
|
|
|
// GET /api/metrics — Prometheus scrape endpoint
|
|
router.get("/metrics", handleMetrics);
|
|
|
|
return router;
|
|
}
|