Katman
Integrations

Elysia

Use Katman with Elysia on Bun — register as an Elysia plugin.

Elysia is a fast web framework for Bun. Katman integrates as an Elysia plugin.

Setup

import {  } from "elysia"
import {  } from "katman/elysia"

const  = new ()
  .("/", () => "Hello from Elysia")
  .((appRouter, {
    : "/rpc",
    : () => ({
      : getDB(),
      : .store?.user,
    }),
  }))
  .(3000)

Context

The context factory receives the Elysia context — access store, request, query, etc.:

katmanElysia(appRouter, {
  : () => ({
    : .store?.user,
    : .request.headers.get("x-forwarded-for"),
  }),
})

What's next?

  • Hono — another Bun-compatible framework option
  • Integrations — other available integrations

On this page