Skip to main content
Home

@fedify/h3@1.10.3
Built and signed on GitHub Actions

Works with
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score100%
Downloads3/wk
Publisheda day ago (1.10.3)

Integrate Fedify with h3

@fedify/h3: Integrate Fedify with h3

JSR npm Matrix Follow @fedify@hollo.social

This package provides a simple way to integrate Fedify with h3, an HTTP server framework behind Nitro, Analog, Vinxi, SolidStart, TanStack Start, and other many web frameworks.

The integration code looks like this:

import { createApp, createRouter } from "h3";
import { integrateFederation, onError } from "@fedify/h3";
import { federation } from "./federation";  // Your `Federation` instance

export const app = createApp({ onError });
app.use(
  integrateFederation(
    federation,
    (event, request) => "context data goes here"
  )
);

const router = createRouter();
app.use(router);
Note

Your app has to configure onError to let Fedify negotiate content types. If you don't do this, Fedify will not be able to respond with a proper error status code when a content negotiation fails.

Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/h3

Import symbol

import * as h_ from "@fedify/h3";
or

Import directly with a jsr specifier

import * as h_ from "jsr:@fedify/h3";

Add Package

pnpm i jsr:@fedify/h3
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/h3

Import symbol

import * as h_ from "@fedify/h3";

Add Package

yarn add jsr:@fedify/h3
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/h3

Import symbol

import * as h_ from "@fedify/h3";

Add Package

vlt install jsr:@fedify/h3

Import symbol

import * as h_ from "@fedify/h3";

Add Package

npx jsr add @fedify/h3

Import symbol

import * as h_ from "@fedify/h3";

Add Package

bunx jsr add @fedify/h3

Import symbol

import * as h_ from "@fedify/h3";