By using BackboneREST on the server and BackboneORM's JSON rendering DSL, you can save time in defining JSON APIs.
Supported frameworks:
Examples (CoffeeScript)
Backbone = require 'backbone'RestController = require 'backbone-rest'ensureLoggedIn = require 'connect-ensure-login' = unless requsercanAccessTaskreq return resstatus401send'you cannot access this task' next app auth: ensureLoggedIn'/login'customAuthorization model_type: Task route: '/tasks'
Examples (JavaScript)
var Backbone = ;var RestController = ;var ensureLoggedIn = ; var { if !requser return resstatus401; return ;}; app auth: customAuthorization model_type: Task route: '/tasks';
Please checkout the website for installation instructions, examples, documentation, and community!
For Contributors
To build the library for Node.js:
$ gulp build
Please run tests before submitting a pull request:
$ gulp test --quick
and eventually all tests:
$ npm test
Test Variants
You can run the following fine-grained tests to resolve problems with specific application frameworks
$ gulp test-express3
$ gulp test-express4
$ gulp test-restify