Skip to content

Commit

Permalink
Update nodehelper docs
Browse files Browse the repository at this point in the history
  • Loading branch information
veeck authored and rejas committed Aug 8, 2022
1 parent 4d8fb8c commit cde0adc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions js/node_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,38 @@ const NodeHelper = Class.extend({
Log.log(`Starting module helper: ${this.name}`);
},

/* stop()
/**
* Called when the MagicMirror² server receives a `SIGINT`
* Close any open connections, stop any sub-processes and
* gracefully exit the module.
*
*/
stop() {
Log.log(`Stopping module helper: ${this.name}`);
},

/* socketNotificationReceived(notification, payload)
/**
* This method is called when a socket notification arrives.
*
* argument notification string - The identifier of the notification.
* argument payload mixed - The payload of the notification.
* @param {string} notification The identifier of the notification.
* @param {*} payload The payload of the notification.
*/
socketNotificationReceived(notification, payload) {
Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`);
},

/* setName(name)
/**
* Set the module name.
*
* argument name string - Module name.
* @param {string} name Module name.
*/
setName(name) {
this.name = name;
},

/* setPath(path)
/**
* Set the module path.
*
* argument path string - Module path.
* @param {string} path Module path.
*/
setPath(path) {
this.path = path;
Expand Down

0 comments on commit cde0adc

Please sign in to comment.