feathers-linvodb

2.1.0 • Public • Published

feathers-linvodb

Build Status Code Climate

Create an LinvoDB Service for FeatherJS.

Installation

npm install linvodb3 feathers-linvodb --save

Documentation

Please refer to the Feathers database adapter documentation for more details or directly at:

  • NeDB - The detailed documentation for this adapter
  • Extending - How to extend a database adapter
  • Pagination and Sorting - How to use pagination and sorting for the database adapter
  • Querying - The common adapter querying mechanism

Complete Example

Here's an example of a Feathers server with a todos linvodb-service.

const feathers = require('feathers');
const rest = require('feathers-rest');
const LinvoDB = require('linvodb3');
const linvodbService = require('feathers-linvodb');
const bodyParser = require('body-parser');
 
const db = new LinvoDB('todo', {});
 
// Create a feathers instance.
var app = feathers()
  // Enable REST services
  .configure(rest())
  // Turn on JSON parser for REST services
  .use(bodyParser.json())
  // Turn on URL-encoded parser for REST services
  .use(bodyParser.urlencoded({extended: true}));
 
// Connect to the db, create and register a Feathers service.
app.use('todos', linvodbService({
  Model: db,
  paginate: {
    default: 2,
    max: 4
  }
}));
 
// Start the server.
var port = 3030;
app.listen(port, function() {
  console.log(`Feathers server listening on port ${port}`);
});

You can run this example by using node examples/app and going to localhost:3030/todos. You should see an empty array. That's because you don't have any Todos yet but you now have full CRUD for your new todos service.

Changelog

2.1.0

  • Use internal methods instead of service methods directly

2.0.0

  • Remove NeDB dependency
  • Migration to ES6 and latest service test suite
  • Changing the way that NeDB services are initialized to be compliant with Feathers 2.0.

1.2.0

  • Migration to shared service test suite (#4)

1.0.0

  • First final release

0.1.1

  • Minor license and documentation updates

0.1.0

  • Initial release.

License

Copyright (c) 2015

Licensed under the MIT license.

Author

Marshall Thompson

Package Sidebar

Install

npm i feathers-linvodb

Weekly Downloads

1

Version

2.1.0

License

MIT

Last publish

Collaborators

  • leeroy