This page is meant to be an up to date, comprehensive list of all of the core hooks in the Sails.js framework, and a reference of a few of the most popular community-made hooks.
The following hooks are maintained by the Sails.js core team and are included in your Sails app by default. You can override or disable them using your sailsrc file or environment variables.
Hook | Package | Latest stable release | Purpose |
---|---|---|---|
grunt |
sails-hook-grunt | Governs the built-in asset pipeline in Sails. | |
orm |
sails-hook-orm | Implements support for Waterline ORM in Sails. | |
sockets |
sails-hook-sockets | Implements Socket.io support in Sails. |
Implements support for the Waterline ORM in Sails.
- The default configuration set by this hook can be found here.
- You can find futher details about this hook's purpose here.
- You can disable this hook by following these instructions.
Implements socket.io support in Sails.
- You can find futher details about this hook's purpose here.
Implements support for the built-in asset pipeline and task runner in Sails.
- You can find futher details about this hook's purpose here.
- You can disable this hook by following these instructions.
There are more than 200 community hooks for Sails.js available on NPM. Here are a few highlights:
Hook | Maintainer | Purpose | Stable release |
---|---|---|---|
sails-hook-webpack | Michael Diarmid | Use Webpack for your Sails app's asset pipeline instead of Grunt. | |
sails-hook-postcss | Jeff Jewiss | Process your Sails application’s CSS with Postcss. | |
sails-hook-babel | Onoshko Dan, Markus Padourek & SANE | Process your Sails application’s CSS with Postcss. | |
sails-hook-responsetime | Luis Lobo Borobia | Add X-Response-Time to both HTTP and Socket request headers. | |
sails-hook-winston | Kikobeats | Integrate the Winston logging system with your Sails application. | |
sails-hook-allowed-hosts | Akshay Bist | Ensure that only requests made from authorized hosts/IP addresses are allowed. | |
sails-hook-cron | Eugene Obrezkov | Run cron tasks for your Sails app. | |
sails-hook-organics | Mike McNeil | Exposes a set of commonly-used functions ("organics") as built-in helpers in your Sails app. |
If you see out of date information on this page, or if you want to add a hook you made, please submit a pull request to this file updating the table of community hooks above.
Note: to be listed on this page, an adapter must be free and open-source (libre and gratis), preferably under the MIT license.