Multi-Project module reused between Client and Task Server

This commit is contained in:
Luis Fernando Molina committed 2021-08-30 11:16:04 +02:00
1 parent 6504f47b6f
commit 71514d580e
8 files changed
+80 -137

No files matched your search

+15 -12
View File
@@ -54,17 +54,6 @@ global.CUSTOM_FAIL_RESPONSE = {
message: 'Custom Message'
}
/*
The CL object is accesible everywhere at the Superalgos Client.
It provides access to all modules built for this Client.
*/
global.CL = {}
/*
The SA object is accesible everywhere at the Superalgos Client.
It provides access to all modules built Superalgos in general.
*/
global.SA = {}
/* Servers */
let WEB_SERVER = require('./webServer.js')
let DATA_FILE_SERVER = require('./dataFileServer.js')
@@ -82,10 +71,24 @@ let WEB_SOCKETS_INTERFACE = require('./webSocketsInterface.js')
let HTTP_INTERFACE = require('./httpInterface.js')
try {
/*
The CL object is accesible everywhere at the Superalgos Client.
It provides access to all modules built for this Client.
*/
global.CL = {}
/*
The SA object is accesible everywhere at the Superalgos Client.
It provides access to all modules built Superalgos in general.
*/
global.SA = {}
/*
First thing is to load the project schema file.
*/
global.PROJECTS_SCHEMA = require(global.env.PATH_TO_PROJECT_SCHEMA)
/*
Setting up the modules that will be available for the Servers Running inside this Client
*/
let MULTI_PROJECT = require('./MultiProject.js');
let MULTI_PROJECT = require('../MultiProject.js');
let MULTI_PROJECT_MODULE = MULTI_PROJECT.newMultiProject()
MULTI_PROJECT_MODULE.initialize(CL, 'CL')
MULTI_PROJECT_MODULE.initialize(SA, 'SA')