A HTTP JSON REST API for Seneca entities
Exposes your data entities as a REST API. For example, if you have a data entity called foo, then the following end points will become available:
You can use the plugin options to change the URL prefix, and to add additional behaviours.
Note that it is not necessary for the underlying entity to be persistent. You can define a virtual entity foo by providing actions for the patterns:
You can seneca.use this plugin multiple times to create multiple independent API end points, so long as you specify different prefixes. The prefix option is used to create separate action patterns so that they do not conflict.
Current Version: 0.3.1
Tested on: Node 0.10.36, Seneca 0.6.1
If you're using this module, feel free to contact me on Twitter if you have any questions! :) @rjrodger
To install and add to the dependencies list in the package.json file for your project:
npm install seneca-jsonrest-api --save
And in your code:
var seneca = require'seneca'use 'jsonrest-api'