Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.15 KB

File metadata and controls

36 lines (27 loc) · 1.15 KB

@fedify/fastify: Integrate Fedify with Fastify

npm Matrix Follow @fedify@hollo.social

This package provides a simple way to integrate Fedify with Fastify.

The integration code looks like this:

import Fastify from "fastify";
import { fedifyPlugin } from "@fedify/fastify";
import { federation } from "./federation.ts";  // Your `Federation` instance

const fastify = Fastify({ logger: true });

await fastify.register(fedifyPlugin, {
  federation,
  contextDataFactory: () => undefined,
});

fastify.listen({ port: 3000 });