npm.io
2.4.4 • Published 1 week ago

@fedify/fastify

Licence
MIT
Version
2.4.4
Deps
1
Size
17 kB
Vulns
0
Weekly
0
Stars
1.0K

@fedify/fastify: Integrate Fedify with Fastify

npm Matrix @fedify@hackers.pub

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

Keywords