Skip to content

Commit

Permalink
Fixed generator file
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Stolojan <[email protected]>
  • Loading branch information
Bogdan Stolojan committed Jan 23, 2019
1 parent be13ba1 commit 1773b59
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,17 @@ function load(raw) {
module.exports = () =>
Promise.resolve()${this.compileBackendModuleImports(backendMasterModules)}
.catch(err => {
console.error('Failed to import master modules:', err));
console.error('Failed to import master modules:', err);
throw err;
}`;
});`;
}

protected compileMain(backendModules: Map<string, string>): string {
return `// @ts-check
const { BackendApplicationConfigProvider } = require('@theia/core/lib/node/backend-application-config-provider');
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)}); ${this.pck.backendMasterModules.size === 0 ? '' : `
const { isMaster } = require('cluster');
if (isMaster) { require('./master')(); }`}
const serverPath = require('path').resolve(__dirname, 'server');
const address = require('@theia/core/lib/node/cluster/main').default(serverPath);
Expand Down

0 comments on commit 1773b59

Please sign in to comment.