Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dahlia/fedify-express
Integrate Fedify with Express
https://github.com/dahlia/fedify-express
express expressjs expressjs-middleware fedify
Last synced: 2 days ago
JSON representation
Integrate Fedify with Express
- Host: GitHub
- URL: https://github.com/dahlia/fedify-express
- Owner: dahlia
- License: mit
- Created: 2024-08-05T11:37:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-29T19:17:13.000Z (3 months ago)
- Last Synced: 2024-12-13T20:49:04.512Z (9 days ago)
- Topics: express, expressjs, expressjs-middleware, fedify
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@fedify/express
- Size: 65.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@fedify/express: Integrate Fedify with Express
==============================================[![npm][npm badge]][npm]
[![Matrix][Matrix badge]][Matrix]
[![Follow @[email protected]][@[email protected] badge]][@[email protected]]This package provides a simple way to integrate [Fedify] with [Express].
The integration code looks like this:
~~~~ typescript
import express from "express";
import { integrateFederation } from "@fedify/express";
import { federation } from "./federation"; // Your `Federation` instanceexport const app = express();
app.set("trust proxy", true);
app.use(integrateFederation(federation, (req) => "context data goes here"));
~~~~[npm]: https://www.npmjs.com/package/@fedify/express
[npm badge]: https://img.shields.io/npm/v/@fedify/express?logo=npm
[Matrix]: https://matrix.to/#/#fedify:matrix.org
[Matrix badge]: https://img.shields.io/matrix/fedify%3Amatrix.org
[@[email protected] badge]: https://fedi-badge.deno.dev/@[email protected]/followers.svg
[@[email protected]]: https://hollo.social/@fedify
[Fedify]: https://fedify.dev/
[Express]: https://expressjs.com/Changelog
---------### Version 0.2.1
To be released.
### Version 0.2.0
Released on September 30, 2024.
- Relaxed the requirement for the peer dependency `@fedify/fedify` to allow
any version under 2.0.0.### Version 0.1.4
Released on August 31, 2024.
- Fixed a bug where it throws `TypeError` with message RequestInit: duplex
option is required when sending a body.### Version 0.1.3
Released on August 5, 2024.
- Fixed the middleware to not fill `Request.body` when the request method is
`GET` or `HEAD`.
- Fixed the middleware to content-negotiate the response based on
the `Accept` header.### Version 0.1.2
Released on August 5, 2024.
- Fixed incorrectly configured export targets in *package.json*.
### Version 0.1.1
Released on August 5, 2024.
- Added missing entry points to the *package.json*.
### Version 0.1.0
Initial release. Released on August 5, 2024.