diff --git a/server.js b/server.js index fbc58c850fb6f7b76b5d9e4d6b6a3ea7ea735875..c0a60e69953d0b02e6649c354e312d34486ef1ba 100644 --- a/server.js +++ b/server.js @@ -1,3 +1,11 @@ +/** + * This file allow CORS for *.deadlock.io + * from the CORS middleware + * To generate the file you have to run Theia Docker-Java version from https://hub.docker.com/r/theiaide/theia-java + * then you will find this file under https://hub.docker.com/r/theiaide/theia-java in the container + */ + + // @ts-check require('reflect-metadata'); @@ -50,6 +58,7 @@ function start(port, host, argv) { }); } + module.exports = (port, host, argv) => Promise.resolve() .then(function () { return Promise.resolve(require('@theia/process/lib/common/process-common-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/process/lib/node/process-backend-module')).then(load) }) @@ -60,7 +69,6 @@ module.exports = (port, host, argv) => Promise.resolve() .then(function () { return Promise.resolve(require('@theia/file-search/lib/node/file-search-backend-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/git/lib/node/git-backend-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/git/lib/node/env/git-env-module')).then(load) }) - .then(function () { return Promise.resolve(require('@theia/json/lib/node/json-backend-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/terminal/lib/node/terminal-backend-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/task/lib/node/task-backend-module')).then(load) }) .then(function () { return Promise.resolve(require('@theia/debug/lib/node/debug-backend-module')).then(load) })