hts/packages/hono
hailin dde6b11fce initial commit. 2024-06-07 15:29:58 +08:00
..
src initial commit. 2024-06-07 15:29:58 +08:00
CHANGELOG.md initial commit. 2024-06-07 15:29:58 +08:00
README.md initial commit. 2024-06-07 15:29:58 +08:00
package.json initial commit. 2024-06-07 15:29:58 +08:00
tsconfig.json initial commit. 2024-06-07 15:29:58 +08:00
tsup.config.js initial commit. 2024-06-07 15:29:58 +08:00
vitest.config.ts initial commit. 2024-06-07 15:29:58 +08:00

README.md

@unkey/hono

Hono.js middleware for authenticating API keys

Check out the docs at unkey.dev/docs.

Here's just an example:

import { Hono } from "hono"
import { UnkeyContext, unkey } from "@aigxion/hono";

const app = new Hono<{ Variables: { unkey: UnkeyContext } }>();

app.use("*", unkey());


app.get("/somewhere", (c) => {
  // access the unkey response here to get metadata of the key etc
  const ... = c.get("unkey")

  return c.text("yo")
})
``