sails-linking-controllers

1.0.7 • Public • Published

sails-linking-controllers

Build Coverage Quality Dependencies

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

Readme

Keywords

Package Sidebar

Install

npm i sails-linking-controllers

Weekly Downloads

4

Version

1.0.7

License

MIT

Last publish

Collaborators

  • chrisns
  • ollienilsen