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 | NPM version | Governs the built-in asset pipeline in Sails. |
orm |
sails-hook-orm | NPM version | Implements support for Waterline ORM in Sails. |
sockets |
sails-hook-sockets | NPM version | Implements Socket.io support in Sails. |
Implements support for the Waterline ORM in Sails.
Release info for sails-hook-orm License info
- 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.
Release info for sails-hook-sockets License info
- You can find futher details about this hook's purpose here.
Implements support for the built-in asset pipeline and task runner in Sails.
Release info for sails-hook-grunt License info
- 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. | Release info for sails-hook-webpack |
| sails-hook-postcss | Jeff Jewiss | Process your Sails application’s CSS with Postcss. | Release info for sails-hook-postcss |
| sails-hook-babel | Onoshko Dan, Markus Padourek & SANE | Process your Sails application’s CSS with Postcss. | Release info for sails-hook-babel |
| sails-hook-responsetime | Luis Lobo Borobia | Add X-Response-Time to both HTTP and Socket request headers. | Release info for sails-hook-responsetime |
| sails-hook-winston | Kikobeats | Integrate the Winston logging system with your Sails application. | Release info for sails-hook-winston |
| sails-hook-allowed-hosts | Akshay Bist | Ensure that only requests made from authorized hosts/IP addresses are allowed. | Release info for sails-hook-allowed-hosts |
| sails-hook-cron | Eugene Obrezkov | Run cron tasks for your Sails app. | Release info for sails-hook-cron |
| sails-hook-organics | Mike McNeil | Exposes a set of commonly-used functions ("organics") as built-in helpers in your Sails app. | Release info for sails-hook-organics |
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.
If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.