latest
fedify-dev/fedifyWorks with
•JSR Score70%•This package works with Node.js, Deno, Bun


License
•MIT
Downloads11/wk
•Publisheda week ago (2.3.4)
Integrate Fedify with Express
@fedify/express: Integrate Fedify with Express
This package provides a simple way to integrate Fedify with Express.
The integration code looks like this:
import express from "express"; import { integrateFederation } from "@fedify/express"; import { federation } from "./federation.ts"; // Your `Federation` instance export const app = express(); app.set("trust proxy", true); app.use(integrateFederation(federation, (req) => "context data goes here"));
Reverse proxy with Express 4.x
If your application uses Express 4.x behind a reverse proxy with a non-standard
port (e.g., Host: example.com:8080), the reconstructed request URL may lose
the port number. This is because Express 4.x's req.host (which respects
trust proxy) strips the port from the Host header.
This issue does not occur with Express 5.x, where req.host retains the port.
If you rely on trust proxy and your origin includes a non-standard port, we
recommend upgrading to Express 5.
Add Package
deno add jsr:@fedify/express
Import symbol
import * as express from "@fedify/express";
Import directly with a jsr specifier
import * as express from "jsr:@fedify/express";