forked from blinkhash/foundation-v2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
25 lines (21 loc) · 735 Bytes
/
index.js
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
const Client = require('./database/main/client');
const Logger = require('./server/main/logger');
const Threads = require('./server/main/threads');
const path = require('path');
////////////////////////////////////////////////////////////////////////////////
// Start Main Stratum Server
/* eslint-disable */
try {
const config = require(path.join(__dirname, './configs/main/config.js'));
const logger = new Logger(config);
// Initialize Local/Remote Databases
const client = new Client(logger, config);
client.handleClientMaster(() => {
client.handleClientWorker(() => {
const threads = new Threads(logger, client, config).setupThreads();
});
});
// Error on Startup
} catch(e) {
throw new Error(e);
}