Use proper type-safe interfaces instead of Node.js http types for the
health handler, and avoid vi.spyOn type issues in shutdown tests by
directly intercepting process.on.
healthMiddleware returns 200 if upstream was reachable within 60s, 503 otherwise.
Exports a factory function — registration in modern.config.ts is a future step.