Linting
All checks were successful
release-tag / release-image (push) Successful in 1m52s
Lint JavaScript/Node.js / lint-js (push) Successful in 11s
DRB Tests / drb_mocha_tests (push) Successful in 29s

This commit is contained in:
Logan Cusano
2024-08-11 15:57:46 -04:00
parent 5cd47378d6
commit 117cbea67f
37 changed files with 2273 additions and 1738 deletions

View File

@@ -4,16 +4,19 @@ const log = new DebugBuilder("server", "server");
// Function called by the main application to initialize the addon
export function initialize(nodeIo, config) {
log.INFO(`Initializing ${config.name}`);
// Call other functions within the addon module
registerSocketEvents(nodeIo, config);
// Call additional initialization functions if needed
log.INFO(`Initializing ${config.name}`);
// Call other functions within the addon module
registerSocketEvents(nodeIo, config);
// Call additional initialization functions if needed
}
// Function to register Socket.IO event handlers
function registerSocketEvents(nodeIo, config) {
nodeIo.on(config.options.eventName, (data) => {
log.DEBUG(`Received event "${config.options.eventName}" from client:`, data);
});
nodeIo.on(config.options.eventName, (data) => {
log.DEBUG(
`Received event "${config.options.eventName}" from client:`,
data,
);
});
}