Edit Page

Available hooks

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.

Core 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.

sails-hook-orm

#

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.

sails-hook-sockets

#

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.

sails-hook-grunt

#

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.

Community-made hooks

#

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
Add your hook to this list
#

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.

Is something missing?

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.

Concepts