Back to Sails

sails-hook-blueprints

lib/hooks/blueprints/README.md

12.12.20001.6 KB
Original Source

sails-hook-blueprints

Implements support for the blueprint API in Sails.

This is a core hook in the Sails.js framework. You can override or disable it using your .sailsrc file or environment variables. See Concepts > Configuration for more information.

Purpose

This hook's responsibilities are:

  1. Use sails.modules to read blueprints from the user's app into self.middleware.
  2. Bind shadow routes to blueprint actions and controller actions.
  3. Listen for route:typeUnknown on sails, interpret route syntax which should match a blueprint action, and bind the appropriate middleware (this happens when the Router is loaded, after all the hooks.)

Help

Have questions or having trouble? Click here.

For more information on overriding core hooks, check out Extending Sails > Hooks.

Bugs  

To report a bug, click here.

Contributing

Please observe the guidelines and conventions laid out in the Sails project contribution guide when opening issues or submitting pull requests.

License

The Sails framework is free and open-source under the MIT License.