{ sailsit }

Sails Js Tutorials for Beginners and Forum

Have a Question?

If you have any question you can ask below or enter what you are looking for!

Disable Hooks or Generators or Modules

Sails provides a feature to disable specific packages or plugins which are used in Sails.
To disable any of the hooks or generators or modules in sailsjs, you can set the feature as false in .sailsrc
You can check below, for sample code for disabling any hooks

{
   "generators":{},
   "modules":{},
   "hooks":{
      "session":false, //sessions disabled 
      "sockets":false, //sockets disabled 
      "pubsub":false //pubsub (socket dependency) disabled
   }
}

 
As above, you can also disable any modules or generators

One Comment

  1. Nice one! Worth noting you can also set these things using system environment variables — e.g. `sails_hooks__grunt=false`. They should be prefixed with `sails_`, and use double-underscores to indicate dots. So `sails.config.hooks.grunt` is set using `sails_hooks__grunt`.

Comments are closed.