createStatusCheckRouter()
Home > @backstage/backend-common
> createStatusCheckRouter
Creates a default status checking router, that you can add to your express app.
Signature:
function createStatusCheckRouter(options: {
logger: LoggerService;
path?: string;
statusCheck?: StatusCheck;
}): Promise<express.Router>;
Parameters
Parameter | Type | Description |
---|---|---|
options | { logger: LoggerService; path?: string; statusCheck?: StatusCheck; } |
Returns:
Promise<express.Router>
Remarks
This adds a /healthcheck
route (or any other path, if given as an argument), which your infra can call to see if the service is ready to serve requests.