Initial move

This commit is contained in:
Logan Cusano
2024-05-12 12:54:20 -04:00
parent 8ab949f15c
commit 4023a7fc2c
24 changed files with 4278 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
{
"name": "Addon 1",
"enabled": false,
"options": {
"eventName": "connection"
}
}

17
addons/example/index.js Normal file
View File

@@ -0,0 +1,17 @@
// addons/addon1/index.js
// Function called by the main application to initialize the addon
export function initialize(nodeIo, config) {
console.log(`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) => {
console.log(`Received event "${config.options.eventName}" from client:`, data);
});
}