Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Node.js Seneca data storage module that uses JSON files.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
jsonfile-store.js version 0.2.2; fixed close call issue

seneca-jsonfile-store - a Seneca plugin

seneca-jsonfile-store Plugin

Node.js seneca data storage module that uses JSON files.

This module is a plugin for the Seneca framework. It provides a storage engine that uses JSON files to persist data. It is not appropriate for production usage, it is intended for very low workloads, and as a example of a storage plugin code base.

Build Status

For a gentle introduction to Seneca itself, see the site.

If you're using this plugin module, feel free to contact me on twitter if you have any questions! :) @rjrodger

Current Version: 0.2.2

Tested on: Seneca 0.6.1, Node 0.10.36


npm install seneca
npm install seneca-jsonfile-store

Quick example

var seneca = require('seneca')()

var apple = seneca.make$('fruit')  = 'Pink Lady'
apple.price = 0.99$(function(err,apple){
  console.log( " = "  )


You don't use this module directly. It provides an underlying data storage engine for the Seneca entity API:

var entity = seneca.make$('typename')
entity.someproperty = "something"
entity.anotherproperty = 100$( function(err,entity){ ... } )
entity.load$( {id: ...}, function(err,entity){ ... } )
entity.list$( {property: ...}, function(err,entity){ ... } )
entity.remove$( {id: ...}, function(err,entity){ ... } )


cd test
mocha jsonfile.test.js --seneca.log.print
Something went wrong with that request. Please try again.