Summary
Now, Hono supports for Deno!! It's experimental but a super cool feature. You can import
Hono from deno.land/x
.
/** @jsx jsx */
import { serve } from 'https://deno.land/std@0.146.0/http/server.ts'
import { Hono, logger, poweredBy, basicAuth, jsx } from 'https://deno.land/x/hono/mod.ts'
const app = new Hono()
app.use('*', logger(), poweredBy())
app.get(
'/auth/*',
basicAuth({
username: 'deno',
password: 'isacool',
})
)
app.get('/', (c) => {
return c.html(<h1>Hello Deno!</h1>)
})
app.get('/auth/abc', (c) => c.text('You are authorized'))
serve(app.fire())
What's Changed
- refactor: enable
strictPropertyInitialization
by @yusukebe in #333 - feat(context): type JSON object as generic var
T
by @equt in #335 - feat: support for Deno! by @yusukebe in #336
- chore: add benchmark scripts for deno by @yusukebe in #337
New Contributors
Full Changelog: v1.5.2...v1.6.0