custom module: add stop() callback (runs when the server stops

This commit is contained in:
jean-emmanuel 2024-07-15 11:03:07 +02:00
parent c56a5bfbeb
commit 026230d8e1
6 changed files with 59 additions and 11 deletions

View file

@ -10,6 +10,7 @@ Using the server's `custom-module` option, users can load a custom javascript mo
// Do whatever you want
// initialize variables
// declare functions
// listen to app events
// load modules
// etc
@ -21,6 +22,11 @@ module.exports = {
// it is called for the main module only
},
stop: function(){
// this will be executed once when the osc server stops
// it is called for the main module only
},
reload: function(){
// this will be executed after the custom module is reloaded
// it is called for the main module only