Refactoring CLIENT PLATFORM
This commit is contained in:
1 parent
7c078b286f
commit
fd7f970304
8 files changed
+21
-21
No files matched your search
@@ -24,7 +24,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
/*
|
||||
We will create an HTTP Server and leave it running forever.
|
||||
*/
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.CLIENT_HTTP_INTERFACE_PORT)
|
||||
SA.nodeModules.http.createServer(onHttpRequest).listen(global.env.PLATFORM_HTTP_INTERFACE_PORT)
|
||||
/* Starting the browser now is optional */
|
||||
if (process.argv.includes("noBrowser")) {
|
||||
//Running Client only with no UI.
|
||||
@@ -33,7 +33,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
if (initialWorkspace.name !== undefined) {
|
||||
queryString = '/?initialWorkspaceName=' + initialWorkspace.name + '&initialWorkspaceProject=' + initialWorkspace.project + '&initialWorkspaceType=' + initialWorkspace.type
|
||||
}
|
||||
SA.nodeModules.open('http://localhost:' + global.env.CLIENT_HTTP_INTERFACE_PORT + queryString)
|
||||
SA.nodeModules.open('http://localhost:' + global.env.PLATFORM_HTTP_INTERFACE_PORT + queryString)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1311,17 +1311,17 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'LegacyPlotter.js':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/LegacyPlotter.js', httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/LegacyPlotter.js', httpResponse)
|
||||
}
|
||||
break
|
||||
case 'PlotterPanel.js':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/PlotterPanel.js', httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/PlotterPanel.js', httpResponse)
|
||||
}
|
||||
break
|
||||
case 'Images': // This means the Images folder.
|
||||
{
|
||||
let path = global.env.PATH_TO_CLIENT + '/WebServer/Images/' + requestPath[2]
|
||||
let path = global.env.PATH_TO_PLATFORM + '/WebServer/Images/' + requestPath[2]
|
||||
|
||||
if (requestPath[3] !== undefined) {
|
||||
path = path + '/' + requestPath[3]
|
||||
@@ -1403,12 +1403,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'WebServer': // This means the WebServer folder.
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/' + requestPath[2], httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/' + requestPath[2], httpResponse)
|
||||
}
|
||||
break
|
||||
case 'externalScripts': // This means the WebServer folder.
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/WebServer/externalScripts/' + requestPath[2], httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + requestPath[2], httpResponse)
|
||||
}
|
||||
break
|
||||
case 'Plotters': // This means the plotter folder, not to be confused with the Plotters script!
|
||||
@@ -1423,12 +1423,12 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
case 'ChartLayers':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/UI/' + endpointOrFile + '/' + requestPath[2], httpResponse)
|
||||
}
|
||||
break
|
||||
case 'Files':
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_CLIENT + '/UI/Data-Files/' + requestPath[2], httpResponse)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/UI/Data-Files/' + requestPath[2], httpResponse)
|
||||
}
|
||||
break
|
||||
case 'Fonts':
|
||||
@@ -1943,7 +1943,7 @@ exports.newHttpInterface = function newHttpInterface() {
|
||||
break
|
||||
default:
|
||||
{
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_CLIENT)
|
||||
SA.projects.foundations.utilities.httpResponses.respondWithWebFile(httpResponse, endpointOrFile, global.env.PATH_TO_PLATFORM)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user