Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@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 });