createHealthCheck
createHealthCheck(
bridgeOrRouter,config?):HealthCheck
Defined in: health.ts:253
Create health check handler
Parameters
Section titled “Parameters”bridgeOrRouter
Section titled “bridgeOrRouter”Bridge or Router instance
Bridge<FrontendAdapter<unknown, unknown, unknown>> | Router
config?
Section titled “config?”Health check configuration
Returns
Section titled “Returns”Health check handler
Example
Section titled “Example”import { createHealthCheck } from 'ai.matey.http';
const healthCheck = createHealthCheck(bridge, { serviceName: 'my-ai-service', version: '1.0.0',});
// In your HTTP server:if (req.url === '/health') { await healthCheck.handle(req, res);}