Loading docs/.vitepress/config.mts +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ const REFERENCES = { { text: "@fedify/h3", link: "https://jsr.io/@fedify/h3/doc" }, { text: "@fedify/postgres", link: "https://jsr.io/@fedify/postgres/doc" }, { text: "@fedify/redis", link: "https://jsr.io/@fedify/redis/doc" }, { text: "@fedify/sqlite", link: "https://jsr.io/@fedify/sqlite/doc" }, { text: "@fedify/testing", link: "https://jsr.io/@fedify/testing/doc" }, ], }; Loading docs/cli.md +12 −6 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ the following command: ::: code-group ~~~~ sh [Node.js] ~~~~ sh [npm] npm install -g @fedify/cli ~~~~ Loading Loading @@ -66,10 +66,17 @@ command: ::: code-group ~~~~ sh [Linux/macOS] ~~~~ sh [Linux] deno install \ -g \ -A \ -gA \ --unstable-fs --unstable-kv --unstable-temporal \ -n fedify \ jsr:@fedify/cli ~~~~ ~~~~ sh [macOS] deno install \ -gA \ --unstable-fs --unstable-kv --unstable-temporal \ -n fedify \ jsr:@fedify/cli Loading @@ -77,8 +84,7 @@ deno install \ ~~~~ powershell [Windows] deno install ` -g ` -A ` -gA ` --unstable-fs --unstable-kv --unstable-temporal ` -n fedify ` jsr:@fedify/cli Loading docs/install.md +22 −6 Original line number Diff line number Diff line Loading @@ -19,20 +19,24 @@ following instructions: ::: code-group ~~~~ sh [Node.js] ~~~~ sh [npm] npm install -g @fedify/cli ~~~~ ~~~~ sh [Bun] bun install -g @fedify/cli ~~~~ sh [Homebrew (Linux/macOS)] brew install fedify ~~~~ ~~~~ powershell [Scoop (Windows)] scoop install fedify ~~~~ ~~~~ sh [Bun] bun install -g @fedify/cli ~~~~ ~~~~ sh [Deno] deno install -g -A --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli deno install -gA --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli ~~~~ ::: Loading Loading @@ -114,10 +118,22 @@ Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js 22.0.0 or later installed on your system. Then you can install Fedify via the following command: ~~~~ sh ::: code-group ~~~~ sh [npm] npm add @fedify/fedify ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/fedify ~~~~ ~~~~ sh [Yarn] yarn add @fedify/fedify ~~~~ ::: Fedify is an ESM-only package, so you need to add `"type": "module"` to the *package.json* file: Loading @@ -125,7 +141,7 @@ Fedify is an ESM-only package, so you need to add `"type": "module"` to the { "type": "module", "dependencies": { "@fedify/fedify": "^1.1.0" "@fedify/fedify": "^1.8.1" } } ~~~~ docs/manual/integration.md +71 −5 Original line number Diff line number Diff line Loading @@ -73,9 +73,33 @@ Express ------- [Express] is a fast, unopinionated, minimalist web framework for Node.js. The [@fedify/express] package provides a middleware to integrate Fedify with The *@fedify/express* package provides a middleware to integrate Fedify with Express: ::: code-group ~~~~ sh [Deno] deno add jsr:@fedify/express ~~~~ ~~~~ sh [npm] npm add @fedify/express ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/express ~~~~ ~~~~ sh [Yarn] yarn add @fedify/express ~~~~ ~~~~ sh [Bun] bun add @fedify/express ~~~~ ::: ~~~~ typescript twoslash // @noErrors: 2345 import express from "express"; Loading @@ -94,7 +118,6 @@ app.use(integrateFederation(federation, (req) => "context data goes here")); // ~~~~ [Express]: https://expressjs.com/ [@fedify/express]: https://github.com/fedify-dev/express Hono Loading Loading @@ -127,7 +150,31 @@ h3 [h3] is an HTTP server framework behind [Nitro], [Analog], [Vinxi], [SolidStart], [TanStack Start], and other many web frameworks. The [@fedify/h3] package provides a middleware to integrate Fedify with h3: The *@fedify/h3* package provides a middleware to integrate Fedify with h3: ::: code-group ~~~~ sh [Deno] deno add jsr:@fedify/h3 ~~~~ ~~~~ sh [npm] npm add @fedify/h3 ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/h3 ~~~~ ~~~~ sh [Yarn] yarn add @fedify/h3 ~~~~ ~~~~ sh [Bun] bun add @fedify/h3 ~~~~ ::: ~~~~ typescript {9-15} twoslash // @noErrors: 2345 Loading Loading @@ -162,7 +209,6 @@ app.use(router); [Vinxi]: https://vinxi.vercel.app/ [SolidStart]: https://start.solidjs.com/ [TanStack Start]: https://tanstack.com/start [@fedify/h3]: https://github.com/fedify-dev/h3 Fresh Loading Loading @@ -230,9 +276,29 @@ NestJS [NestJS] is a modular, versatile, and scalable framework for building efficient, reliable, and scalable server-side applications with Node.js and TypeScript. The [@fedify/nestjs] package provides a middleware to integrate Fedify with The *@fedify/nestjs* package provides a middleware to integrate Fedify with NestJS: ::: code-group ~~~~ sh [npm] npm add @fedify/nestjs ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/nestjs ~~~~ ~~~~ sh [Yarn] yarn add @fedify/nestjs ~~~~ ~~~~ sh [Bun] bun add @fedify/nestjs ~~~~ ::: ~~~~ typescript [modules/federation/federation.service.ts] twoslash import { Injectable, Inject, OnModuleInit } from '@nestjs/common'; import { Loading docs/manual/kv.md +78 −8 Original line number Diff line number Diff line Loading @@ -45,8 +45,32 @@ const federation = createFederation<void>({ ### `SqliteKvStore` > [!NOTE] > The [`SqliteKvStore`] class is available in the *@fedify/sqlite* package. To use the [`SqliteKvStore`], you need to install the *@fedify/sqlite* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/sqlite ~~~~ ~~~~ bash [npm] npm add @fedify/sqlite ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/sqlite ~~~~ ~~~~ bash [Yarn] yarn add @fedify/sqlite ~~~~ ~~~~ bash [Bun] bun add @fedify/sqlite ~~~~ ::: [`SqliteKvStore`] is a simple key–value store implementation that uses SQLite as the backend storage. It provides persistent storage with minimal configuration. Loading Loading @@ -139,8 +163,32 @@ const federation = createFederation<void>({ ### [`RedisKvStore`] > [!NOTE] > The [`RedisKvStore`] class is available in the [@fedify/redis] package. To use the [`RedisKvStore`], you need to install the *@fedify/redis* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/redis ~~~~ ~~~~ bash [npm] npm add @fedify/redis ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/redis ~~~~ ~~~~ bash [Yarn] yarn add @fedify/redis ~~~~ ~~~~ bash [Bun] bun add @fedify/redis ~~~~ ::: [`RedisKvStore`] is a key–value store implementation that uses Redis as the backend storage. It provides scalability and high performance, making it Loading Loading @@ -168,13 +216,36 @@ const federation = createFederation<void>({ }); ~~~~ [@fedify/redis]: https://github.com/fedify-dev/redis [`RedisKvStore`]: https://jsr.io/@fedify/redis/doc/kv/~/RedisKvStore ### [`PostgresKvStore`] > [!NOTE] > The [`PostgresKvStore`] class is available in the [@fedify/postgres] package. To use the [`PostgresKvStore`], you need to install the *@fedify/postgres* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/postgres ~~~~ ~~~~ bash [npm] npm add @fedify/postgres ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/postgres ~~~~ ~~~~ bash [Yarn] yarn add @fedify/postgres ~~~~ ~~~~ bash [Bun] bun add @fedify/postgres ~~~~ ::: [`PostgresKvStore`] is a key–value store implementation that uses PostgreSQL as the backend storage. It provides scalability and high performance, making it Loading Loading @@ -204,7 +275,6 @@ const federation = createFederation<void>({ ~~~~ [`PostgresKvStore`]: https://jsr.io/@fedify/postgres/doc/kv/~/PostgresKvStore [@fedify/postgres]: https://github.com/fedify-dev/postgres ### `WorkersKvStore` (Cloudflare Workers only) Loading Loading
docs/.vitepress/config.mts +1 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ const REFERENCES = { { text: "@fedify/h3", link: "https://jsr.io/@fedify/h3/doc" }, { text: "@fedify/postgres", link: "https://jsr.io/@fedify/postgres/doc" }, { text: "@fedify/redis", link: "https://jsr.io/@fedify/redis/doc" }, { text: "@fedify/sqlite", link: "https://jsr.io/@fedify/sqlite/doc" }, { text: "@fedify/testing", link: "https://jsr.io/@fedify/testing/doc" }, ], }; Loading
docs/cli.md +12 −6 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ the following command: ::: code-group ~~~~ sh [Node.js] ~~~~ sh [npm] npm install -g @fedify/cli ~~~~ Loading Loading @@ -66,10 +66,17 @@ command: ::: code-group ~~~~ sh [Linux/macOS] ~~~~ sh [Linux] deno install \ -g \ -A \ -gA \ --unstable-fs --unstable-kv --unstable-temporal \ -n fedify \ jsr:@fedify/cli ~~~~ ~~~~ sh [macOS] deno install \ -gA \ --unstable-fs --unstable-kv --unstable-temporal \ -n fedify \ jsr:@fedify/cli Loading @@ -77,8 +84,7 @@ deno install \ ~~~~ powershell [Windows] deno install ` -g ` -A ` -gA ` --unstable-fs --unstable-kv --unstable-temporal ` -n fedify ` jsr:@fedify/cli Loading
docs/install.md +22 −6 Original line number Diff line number Diff line Loading @@ -19,20 +19,24 @@ following instructions: ::: code-group ~~~~ sh [Node.js] ~~~~ sh [npm] npm install -g @fedify/cli ~~~~ ~~~~ sh [Bun] bun install -g @fedify/cli ~~~~ sh [Homebrew (Linux/macOS)] brew install fedify ~~~~ ~~~~ powershell [Scoop (Windows)] scoop install fedify ~~~~ ~~~~ sh [Bun] bun install -g @fedify/cli ~~~~ ~~~~ sh [Deno] deno install -g -A --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli deno install -gA --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli ~~~~ ::: Loading Loading @@ -114,10 +118,22 @@ Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js 22.0.0 or later installed on your system. Then you can install Fedify via the following command: ~~~~ sh ::: code-group ~~~~ sh [npm] npm add @fedify/fedify ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/fedify ~~~~ ~~~~ sh [Yarn] yarn add @fedify/fedify ~~~~ ::: Fedify is an ESM-only package, so you need to add `"type": "module"` to the *package.json* file: Loading @@ -125,7 +141,7 @@ Fedify is an ESM-only package, so you need to add `"type": "module"` to the { "type": "module", "dependencies": { "@fedify/fedify": "^1.1.0" "@fedify/fedify": "^1.8.1" } } ~~~~
docs/manual/integration.md +71 −5 Original line number Diff line number Diff line Loading @@ -73,9 +73,33 @@ Express ------- [Express] is a fast, unopinionated, minimalist web framework for Node.js. The [@fedify/express] package provides a middleware to integrate Fedify with The *@fedify/express* package provides a middleware to integrate Fedify with Express: ::: code-group ~~~~ sh [Deno] deno add jsr:@fedify/express ~~~~ ~~~~ sh [npm] npm add @fedify/express ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/express ~~~~ ~~~~ sh [Yarn] yarn add @fedify/express ~~~~ ~~~~ sh [Bun] bun add @fedify/express ~~~~ ::: ~~~~ typescript twoslash // @noErrors: 2345 import express from "express"; Loading @@ -94,7 +118,6 @@ app.use(integrateFederation(federation, (req) => "context data goes here")); // ~~~~ [Express]: https://expressjs.com/ [@fedify/express]: https://github.com/fedify-dev/express Hono Loading Loading @@ -127,7 +150,31 @@ h3 [h3] is an HTTP server framework behind [Nitro], [Analog], [Vinxi], [SolidStart], [TanStack Start], and other many web frameworks. The [@fedify/h3] package provides a middleware to integrate Fedify with h3: The *@fedify/h3* package provides a middleware to integrate Fedify with h3: ::: code-group ~~~~ sh [Deno] deno add jsr:@fedify/h3 ~~~~ ~~~~ sh [npm] npm add @fedify/h3 ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/h3 ~~~~ ~~~~ sh [Yarn] yarn add @fedify/h3 ~~~~ ~~~~ sh [Bun] bun add @fedify/h3 ~~~~ ::: ~~~~ typescript {9-15} twoslash // @noErrors: 2345 Loading Loading @@ -162,7 +209,6 @@ app.use(router); [Vinxi]: https://vinxi.vercel.app/ [SolidStart]: https://start.solidjs.com/ [TanStack Start]: https://tanstack.com/start [@fedify/h3]: https://github.com/fedify-dev/h3 Fresh Loading Loading @@ -230,9 +276,29 @@ NestJS [NestJS] is a modular, versatile, and scalable framework for building efficient, reliable, and scalable server-side applications with Node.js and TypeScript. The [@fedify/nestjs] package provides a middleware to integrate Fedify with The *@fedify/nestjs* package provides a middleware to integrate Fedify with NestJS: ::: code-group ~~~~ sh [npm] npm add @fedify/nestjs ~~~~ ~~~~ sh [pnpm] pnpm add @fedify/nestjs ~~~~ ~~~~ sh [Yarn] yarn add @fedify/nestjs ~~~~ ~~~~ sh [Bun] bun add @fedify/nestjs ~~~~ ::: ~~~~ typescript [modules/federation/federation.service.ts] twoslash import { Injectable, Inject, OnModuleInit } from '@nestjs/common'; import { Loading
docs/manual/kv.md +78 −8 Original line number Diff line number Diff line Loading @@ -45,8 +45,32 @@ const federation = createFederation<void>({ ### `SqliteKvStore` > [!NOTE] > The [`SqliteKvStore`] class is available in the *@fedify/sqlite* package. To use the [`SqliteKvStore`], you need to install the *@fedify/sqlite* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/sqlite ~~~~ ~~~~ bash [npm] npm add @fedify/sqlite ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/sqlite ~~~~ ~~~~ bash [Yarn] yarn add @fedify/sqlite ~~~~ ~~~~ bash [Bun] bun add @fedify/sqlite ~~~~ ::: [`SqliteKvStore`] is a simple key–value store implementation that uses SQLite as the backend storage. It provides persistent storage with minimal configuration. Loading Loading @@ -139,8 +163,32 @@ const federation = createFederation<void>({ ### [`RedisKvStore`] > [!NOTE] > The [`RedisKvStore`] class is available in the [@fedify/redis] package. To use the [`RedisKvStore`], you need to install the *@fedify/redis* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/redis ~~~~ ~~~~ bash [npm] npm add @fedify/redis ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/redis ~~~~ ~~~~ bash [Yarn] yarn add @fedify/redis ~~~~ ~~~~ bash [Bun] bun add @fedify/redis ~~~~ ::: [`RedisKvStore`] is a key–value store implementation that uses Redis as the backend storage. It provides scalability and high performance, making it Loading Loading @@ -168,13 +216,36 @@ const federation = createFederation<void>({ }); ~~~~ [@fedify/redis]: https://github.com/fedify-dev/redis [`RedisKvStore`]: https://jsr.io/@fedify/redis/doc/kv/~/RedisKvStore ### [`PostgresKvStore`] > [!NOTE] > The [`PostgresKvStore`] class is available in the [@fedify/postgres] package. To use the [`PostgresKvStore`], you need to install the *@fedify/postgres* package first: ::: code-group ~~~~ bash [Deno] deno add jsr:@fedify/postgres ~~~~ ~~~~ bash [npm] npm add @fedify/postgres ~~~~ ~~~~ bash [pnpm] pnpm add @fedify/postgres ~~~~ ~~~~ bash [Yarn] yarn add @fedify/postgres ~~~~ ~~~~ bash [Bun] bun add @fedify/postgres ~~~~ ::: [`PostgresKvStore`] is a key–value store implementation that uses PostgreSQL as the backend storage. It provides scalability and high performance, making it Loading Loading @@ -204,7 +275,6 @@ const federation = createFederation<void>({ ~~~~ [`PostgresKvStore`]: https://jsr.io/@fedify/postgres/doc/kv/~/PostgresKvStore [@fedify/postgres]: https://github.com/fedify-dev/postgres ### `WorkersKvStore` (Cloudflare Workers only) Loading