github honojs/hono v1.6.0

latest releases: v4.4.6, v4.5.0-rc.1, v4.4.5...
23 months 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.