feat(medusa): Add health endpoint for all running modes of medusa (#10737)
This commit is contained in:
@@ -138,6 +138,12 @@ async function start(args: {
|
||||
}
|
||||
|
||||
const serverActivity = logger.activity(`Creating server`)
|
||||
|
||||
// Register a health check endpoint. Ideally this also checks the readiness of the service, rather than just returning a static response.
|
||||
app.get("/health", (_, res) => {
|
||||
res.status(200).send("OK")
|
||||
})
|
||||
|
||||
const server = GracefulShutdownServer.create(
|
||||
http_.listen(port, host).on("listening", () => {
|
||||
logger.success(
|
||||
|
||||
Reference in New Issue
Block a user