@gabortorma/feathers-nitro-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

feathers-nitro-adapter

npm version npm downloads License code style

Nitro adapter plugin for FeathersJS API

🏀 Online playground

Install

pnpm install -D @gabortorma/feathers-nitro-adapter

Usage in Nuxt v3

Create a new nitro plugin file in server/plugins folder:

Express adapter example:

// server/plugins/feathers-express.ts
import { createFeathersExpressAdapterNitroPlugin } from '@gabortorma/feathers-nitro-adapter'
import { app } from 'feathers-api/src/app' // import your feathers app from workspace

export default createFeathersExpressAdapterNitroPlugin(app)

See Express fixture in test cases.

Koa adapter example:

// server/plugins/feathers-koa.ts
import { createFeathersKoaAdapterNitroPlugin } from '@gabortorma/feathers-nitro-adapter'
import { app } from 'feathers-api/src/app' // import your feathers app from workspace

export default createFeathersKoaAdapterNitroPlugin(app)

See Koa fixture in test cases.

Socket.io adapter example:

// server/plugins/feathers-socket.io.ts
import { createFeathersSocketIoAdapterNitroPlugin } from '@gabortorma/feathers-nitro-adapter'
import { app } from 'feathers-api/src/app'

export default createFeathersSocketIoAdapterNitroPlugin(app)

See Socket.io fixture in test cases.

More example

You can check the playground folder for complex example with rest and socket.io transport and authentication.

Package Sidebar

Install

npm i @gabortorma/feathers-nitro-adapter

Weekly Downloads

1

Version

0.6.0

License

MIT

Unpacked Size

27.5 kB

Total Files

33

Last publish

Collaborators

  • gabortorma