XYOracleNetwork/clients

View on GitHub
packages/automation-witness-server/src/Server/addHealthChecks.ts

Summary

Maintainability
A
1 hr
Test Coverage
import type { Express } from 'express'

export const addHealthChecks = (app: Express) => {
  app.get('/', (_req, res, next) => {
    /* #swagger.tags = ['Health'] */
    /* #swagger.summary = 'Get the health check for the server' */
    res.json({ alive: true })
    next()
  })
  app.get('/healthz', (_req, res, next) => {
    /* #swagger.tags = ['Health'] */
    /* #swagger.summary = 'Get the health check for the server' */
    res.json({ alive: true })
    next()
  })
  return app
}