working monaco editor

This commit is contained in:
Alexandru Stefan committed 2021-11-09 10:06:04 +02:00
1 parent a82c83130d
commit bc08ff7275
121 files changed
+2192 -370

No files matched your search

+9 -1
View File
@@ -1606,7 +1606,15 @@ exports.newHttpInterface = function newHttpInterface() {
break
case 'externalScripts': // This means the WebServer folder.
{
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + requestPath[2], httpResponse)
// This allows to have sub-folders in externalScripts
let fullPath = ''
for (let i = 2; i < requestPath.length; i++) {
fullPath += requestPath[i]
if( i !== requestPath.length - 1) {
fullPath += '/'
}
}
SA.projects.foundations.utilities.httpResponses.respondWithFile(global.env.PATH_TO_PLATFORM + '/WebServer/externalScripts/' + fullPath, httpResponse)
}
break
case 'Plotters': // This means the plotter folder, not to be confused with the Plotters script!