This commit is contained in:
Chris Wanstrath 2026-02-16 13:26:21 -08:00
parent 1b19e09e14
commit 7e17ab5751

View File

@ -25,6 +25,7 @@ export type HypeProps = {
prettyHTML?: boolean prettyHTML?: boolean
layout?: boolean layout?: boolean
logging?: boolean logging?: boolean
ok?: boolean
} }
type InternalProps = HypeProps & { _isRouter?: boolean } type InternalProps = HypeProps & { _isRouter?: boolean }
@ -141,6 +142,10 @@ export class Hype<
if (this.routesRegistered) return if (this.routesRegistered) return
this.routesRegistered = true this.routesRegistered = true
// healthcheck
if (this.props.ok)
this.get('/ok', c => c.text('ok'))
// serve frontend js // serve frontend js
this.use('*', async (c, next) => { this.use('*', async (c, next) => {
await fnStorage.run({ fns: new Map(), counter: 0 }, async () => { await fnStorage.run({ fns: new Map(), counter: 0 }, async () => {