code-server/src/node/routes/health.ts
2020-10-26 17:56:13 -05:00

11 lines
216 B
TypeScript

import { Router } from "express"
export const router = Router()
router.get("/", (req, res) => {
res.json({
status: req.heart.alive() ? "alive" : "expired",
lastHeartbeat: req.heart.lastHeartbeat,
})
})