2019-06-06 19:22:43 +02:00
|
|
|
//call new Server
|
|
|
|
global.WebSocket = require('ws');
|
|
|
|
global.EventEmitter = require('events').EventEmitter;
|
|
|
|
global.fs = require('fs');
|
|
|
|
global.createKeccakHash = require('keccak');
|
|
|
|
const AsyncConsole = require('asyncconsole')
|
|
|
|
|
|
|
|
let Server = require("./src/Server.js");
|
2019-06-11 23:01:44 +02:00
|
|
|
let config = require('./src/db/config.json');
|
|
|
|
global.SERVER = new Server(config);
|
2019-06-12 17:35:22 +02:00
|
|
|
let console = process.platform == 'win32' ? new AsyncConsole("", input => {
|
2019-06-06 19:22:43 +02:00
|
|
|
try {
|
|
|
|
console.log(JSON.stringify(eval(input)));
|
|
|
|
} catch(e) {
|
|
|
|
console.log(e.toString());
|
|
|
|
}
|
2019-06-12 17:35:22 +02:00
|
|
|
}) : {};
|