Files
recflare/turbo/generators/templates/fetch-worker-vite/src/{{ slug name }}.app.ts.hbs
T
Devin Zuczek 8e644a5c20 Initial commit
2026-06-08 18:23:40 -04:00

27 lines
521 B
Handlebars

import { Hono } from 'hono'
import { useWorkersLogger } from 'workers-tagged-logger'
import { withNotFound, withOnError } from '@repo/hono-helpers'
import type { App } from './context'
const app = new Hono<App>()
.use(
'*',
// middleware
(c, next) =>
useWorkersLogger(c.env.NAME, {
environment: c.env.ENVIRONMENT,
release: c.env.SENTRY_RELEASE,
})(c, next)
)
.onError(withOnError())
.notFound(withNotFound())
.get('/', async (c) => {
return c.text('hello, world!')
})
export default app