Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 916 Bytes

File metadata and controls

30 lines (21 loc) · 916 Bytes

@fedify/fresh: Integrate Fedify with Fresh 2.x

Follow @fedify@hollo.social

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

The integration code looks like this:

import { integrateHandler } from "@fedify/fresh";
import { App, staticFiles } from "fresh";
import { federation } from "./federation.ts";
import { define, type State } from "./utils.ts";

const fedifyMiddleware = define.middleware(
  integrateHandler<void, State>(federation, () => undefined),
);

app.use(fedifyMiddleware);