How to create an Installable Hook in Sails.js

devquora
devquora

Posted On: Jun 23, 2021

 

You can create an Installable Hook in Sails.js with the help of the following steps:

  • Choose a name for your new hook. It must not conflict with any of the core hook names.
  • Create a new folder on your system with the name sails-hook-<your hook name>. 
  • Create a package.json file in the folder.
  • Write your hook code in the index.

 

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Sails.js Interview Questions

    Explain Sails.js?

    Sails.js is an open-source model view controller means the MVC web application framework developed atop the Node. js environment which is designed to make it easy to build custom, enterprise-grade Nod...

    Sails.js Interview Questions

    List some features of Sails.js?

    Some of the features of Sails.js are as follows:Powerful associations. Auto-generate REST APIs. Support WebSockets with no additional code.&nbsp; Declarative, reusable security policies.&nbsp; ...

    Sails.js Interview Questions

    How to create an application instance in Sails.js?

    You can create an application instance in Sails.js with the help of the inbuilt application method present in Sail.js....