sails-linking-controllers
v1.0.7
Published
Linking controllers
Downloads
4
Readme
sails-linking-controllers
Description
Ability to generate hateoas-compatible links to actions (list/create) on controllers.
Install
$ npm install sails-linking-controllers
Usage
Add a links array to your controller's _config object, like so (in yourController.js):
module.exports = {
...
_config: {
...
links: ['action1', 'action2', ...],
...
},
...
}
Links to perform those actions will then be added to your responseses.
Tests
$ npm install
$ npm test