@gabortorma/feathers-nitro-adapter
v0.6.0
Published
Nitro adapter plugin for FeathersJS API
Downloads
32
Maintainers
Readme
feathers-nitro-adapter
Nitro adapter plugin for FeathersJS API
Install
pnpm install -D @gabortorma/feathers-nitro-adapterUsage 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.
