🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@fedify/nuxt

Package Overview
Dependencies
Maintainers
3
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fedify/nuxt

Integrate Fedify with Nuxt

latest
Source
npmnpm
Version
2.3.1
Version published
Maintainers
3
Created
Source

@fedify/nuxt: Integrate Fedify with Nuxt

JSR npm Matrix @fedify@hollo.social

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

Supported framework versions:

  • Nuxt 4.x
  • Nitro 2.x (Nuxt 4 runtime)

Installation

deno add jsr:@fedify/nuxt
# or
npm add @fedify/nuxt
# or
pnpm add @fedify/nuxt
# or
yarn add @fedify/nuxt
# or
bun add @fedify/nuxt

Usage

Create your Federation instance in server/federation.ts:

import { createFederation, MemoryKvStore } from "@fedify/fedify";

const federation = createFederation({
  kv: new MemoryKvStore(),
});

// ... configure your federation ...

export default federation;

Then enable the Nuxt module in nuxt.config.ts:

export default defineNuxtConfig({
  modules: ["@fedify/nuxt"],
});

By default, @fedify/nuxt loads your Federation instance from #server/federation.

If your project uses a different file path or context data factory, configure the module options:

export default defineNuxtConfig({
  modules: ["@fedify/nuxt"],
  fedify: {
    federationModule: "#server/federation",
    contextDataFactoryModule: "#server/fedify-context",
  },
});

The context data factory module should export either:

  • default function, or
  • contextDataFactory named export

with this signature:

import type { ContextDataFactory } from "@fedify/nuxt";

const contextDataFactory: ContextDataFactory<unknown> = async (event, request) => {
  return {
    ip: event.node.req.socket.remoteAddress,
    method: request.method,
  };
};

export default contextDataFactory;

Keywords

Fedify

FAQs

Package last updated on 27 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts