@node-in-layers/mcp-server
    Preparing search index...

    Interface ExpressRoute

    An additional Express route to mount on the HTTP server alongside the MCP endpoint. Useful for health checks, webhooks, or any non-MCP HTTP traffic that should share the same process.

    const healthRoute: ExpressRoute = {
    path: '/health',
    method: 'GET',
    handler: async (_req, res) => { res.json({ ok: true }) },
    }
    interface ExpressRoute {
        handler: (req: Request, res: Response) => Promise<void>;
        method: "GET" | "POST" | "PUT" | "DELETE";
        path: string;
    }
    Index

    Properties

    Properties

    handler: (req: Request, res: Response) => Promise<void>

    Async Express request handler.

    method: "GET" | "POST" | "PUT" | "DELETE"

    HTTP method for the route.

    path: string

    URL path for the route (e.g. '/health').