Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
/h3Public archive

Repository files navigation

@fedify/h3: Integrate Fedify with h3

Important

This repository is obsolete and has been archived in favor of the monorepo fedify-dev/fedify.

npmMatrixFollow @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` instanceexportconstapp=createApp({ onError });app.use(integrateFederation(federation,(event,request)=>"context data goes here"));constrouter=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.

Changelog

Version 0.1.3

To be released.

Version 0.1.2

Released on February 28, 2025.

  • Made the package compatible with Fedify 1.0.0 or later.

Version 0.1.1

Released on August 6, 2024.

  • Added missing entry points to the package.json.

Version 0.1.0

Initial release. Released on July 6, 2024.

About

Integrate Fedify with h3

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages