Fedify: an ActivityPub server framework
Introducing @fedify/express, a package that integrates Express, a popular web framework in Node.js, with Fedify. You can install it with the following command:
npm add @fedify/express
This package provides a middleware called integrateFederation()
that allows you to integrate #Fedify with #Express:
import express from "express";
import { integrateFederation } from "@fedify/express";
import { federation } from "./federation"; // Your `Federation` instance
export const app = express();
app.set("trust proxy", true);
app.use(integrateFederation(federation, (req) => "context data goes here"));