npm hono 1.6.0
v1.6.0

latest releases: 4.6.9, 4.6.8, 4.6.7...
2 years ago

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

New Contributors

  • @equt made their first contribution in #335

Full Changelog: v1.5.2...v1.6.0

Don't miss a new hono release

NewReleases is sending notifications on new releases.