Nitro adapter plugin for FeathersJS API
pnpm install -D @gabortorma/feathers-nitro-adapter
Create a new nitro plugin file in server/plugins
folder:
// 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.
// 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.
// 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.
You can check the playground folder for complex example with rest and socket.io transport and authentication.