A service using an embedded datastore for node.js
Latest commit a0d0767 Nov 12, 2016 @daffl daffl Updating changelog



Build Status Code Climate Test Coverage Dependency Status Download Status Slack Status

Create an NeDB Service for FeatherJS.


npm install nedb feathers-nedb --save


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 messages nedb-service.

import NeDB from 'nedb';
import feathers from 'feathers';
import bodyParser from 'body-parser';
import service from '../lib';

const db = new NeDB({
  filename: './db-data/messages',
  autoload: true

// Create a feathers instance.
var app = feathers()
  // Enable REST services
  // Turn on JSON parser for REST services
  // 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('messages', service({
  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 example/app and going to localhost:3030/messages. 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 messages service.


Copyright (c) 2016

Licensed under the MIT license.


Marshall Thompson