objection-rest
v0.5.0
Published
REST API generator for objection.js models
Downloads
18
Readme
Topics
Introduction
REST API generator for objection.js models.
Installation
npm install objection objection-rest
Getting started
var objection = require('objection');
var ObjectionRest = require('objection-rest');
var Person = require('./models/Person');
var Movie = require('./models/Movie');
ObjectionRest(objection)
.routePrefix('/api')
.addModel(Person, function(findQuery) {
// findQuery.registerFilter(...) see objection-find
})
.addModel(Movie)
.generate(app);
API documentation
See objection-find documentation for the findQuery API.