@vevedh/feathers-nitro
v0.5.0
Published
FeathersJS integration for Nuxt/Nitro with Express, Koa, Socket.IO, and multi-instance support
Downloads
240
Maintainers
Readme
@vevedh/feathers-nitro
Nitro adapter plugin for FeathersJS APIs. It integrates Feathers applications with Nuxt/Nitro through Express, Koa, or Socket.IO adapters and supports multiple adapter instances.
Requirements
- Node.js
^22.12.0,^24.11.0, or>=26.0.0 - Nuxt 4 / Nitro 2
- FeathersJS 5
Install
pnpm add -D @vevedh/feathers-nitroEquivalent commands:
npm install --save-dev @vevedh/feathers-nitro
# or
yarn add --dev @vevedh/feathers-nitroUsage with Nuxt 4
Create a Nitro plugin in the server/plugins directory. Nuxt 4 keeps server code at the project root, while application UI code normally lives under app/.
Express adapter
// server/plugins/feathers-express.ts
import { createFeathersExpressAdapterNitroPlugin } from '@vevedh/feathers-nitro'
import { app } from 'feathers-api/src/app'
export default createFeathersExpressAdapterNitroPlugin(app)See the Express fixture for a complete test setup.
Koa adapter
// server/plugins/feathers-koa.ts
import { createFeathersKoaAdapterNitroPlugin } from '@vevedh/feathers-nitro'
import { app } from 'feathers-api/src/app'
export default createFeathersKoaAdapterNitroPlugin(app)See the Koa fixture for a complete test setup.
Socket.IO adapter
// server/plugins/feathers-socket.io.ts
import { createFeathersSocketIoAdapterNitroPlugin } from '@vevedh/feathers-nitro'
import { app } from 'feathers-api/src/app'
export default createFeathersSocketIoAdapterNitroPlugin(app)See the Socket.IO fixture for a complete test setup.
Exported entry points
The package exposes the following public entry points:
import { /* adapter factories */ } from '@vevedh/feathers-nitro'
import { /* router helpers */ } from '@vevedh/feathers-nitro/routers'
import { /* plugin helpers */ } from '@vevedh/feathers-nitro/plugins'
import { /* request handlers */ } from '@vevedh/feathers-nitro/handlers'
import { /* setup helpers */ } from '@vevedh/feathers-nitro/setup'The playground directory contains a Nuxt 4 example combining REST, Socket.IO, Pinia 3, and authentication without the obsolete nuxt-feathers-pinia auto-import layer.
Development
corepack enable
corepack prepare [email protected] --activate
pnpm install --frozen-lockfile
pnpm verifypnpm verify validates package identity, lockfile portability, the Vitest retry classifier, strict TypeScript, ESLint, Feathers/Nuxt integration tests, and the npm tarball contents.
Dependency maintenance is based on Taze with a 14-day maturity period:
pnpm deps:check:recursive
pnpm deps:update:safe:recursiveReview Nuxt, Nitro, H3, TypeScript, Vitest, and other major upgrades independently before regenerating the lockfile.
Publishing
The package is configured as a public scoped npm package.
npm login --registry=https://registry.npmjs.org/
pnpm verify
pnpm publish --access public --registry=https://registry.npmjs.org/ --no-git-checksBefore publication, create the vevedh/feathers-nitro repository, authenticate with npm, and follow PUBLISHING.md. On Windows, ./scripts/publish-direct.ps1 validates the project, pushes main and v0.5.0, then publishes the public scoped package directly to npm.
Attribution
This repository is a maintained fork of @gabortorma/feathers-nitro-adapter. The original author is credited in package.json and LICENSE.
License
MIT
