Hooks examples

A hook is an executable file that is called under a certain pre-configured condition. For example, a hook can ensure a database update occurs when a snap gets upgraded.

For more information about hooks

Configure hook

Help users configure the port their webserver runs on.

View the configure hook template code

In order to use this hook, your application will need to watch for changes in the config files generated by the configure hook. This can be done by adding a small procedure to your application.

View the code of a node.js based procedure