feathers-js-data
A Feathers.js service for JS-Data.js
npm i -S feathers-js-data
This service is for use on a Feathers.js server to compliment a client Js-Data application.
Js-Data container setup
This is only an example. You can of course use any js-data adapter you want on your backend. You can also reuse js-data Container, Adapter, & Mapper configs between your client build and feathers server, if you want.
// /js-data-container.js const jsdata = ;const MongoDBAdapter = MongoDBAdapter; moduleexports = { const container = mapperDefaults: idAttribute: '_id' const adapter = uri: 'mongodb://localhost:27017/dev' container return container}
Feathers service setup
Add you service in the feathers app, example config using a js-data container
// services/todos/index.js const container = const service = module{ const app = this; // setup our js-data Mapper // http://www.js-data.io/v3.0/docs/modeling-your-data#define-mappers const mapper = container // the feathers-js-data service expects a js-data Mapper { mapper: new Mapper() } app;};