this.load('../lib/extensions', function (filePath) { //Check if exists if (exists(filePath)) { //Require extension var ext = require(filePath); //Create extension if (ext.hasOwnProperty('core') && ext.core.hasOwnProperty('extends') && typeof ext.core.extends === 'function') { ext.core.extends(App, modelStorage, serviceStorage, configStorage); } } });
this.load('../lib/extensions', function (filePath) { //Check if exists if (exists(filePath)) { //Require extension var ext = require(filePath); //Create extension if (ext.hasOwnProperty('core') && ext.core.hasOwnProperty('extends') && ext.core.extends.hasOwnProperty('socket') && typeof ext.core.extends.socket === 'function') { ext.core.extends.socket(io); } } });