-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
29 lines (20 loc) · 742 Bytes
/
server.js
File metadata and controls
29 lines (20 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const WORKER_LITERALS = require('./app/core/literals/workers-literals');
const LAUNCHER_LITERALS = require('./app/core/literals/launcher-literals');
const Launcher = require(LAUNCHER_LITERALS.INDEX_PATH);
class CoreServer {
static init() {
// Initializes Dotenv
require('dotenv').config();
// Worker creation -- default is webapi
const workerName = process.env.ENGINE || WORKER_LITERALS.DEFAULT_WORKER;
const launcher = new Launcher(workerName);
console.log(LAUNCHER_LITERALS.INITIALIZING_SERVER);
// Configures worker
const launcherConfig = launcher.configure();
// Defines configuration
launcher.bootstrap(launcherConfig);
// Starts worker
launcher.run();
}
}
CoreServer.init();