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-06 19:22:43 +02:00
|
|
|
let console = new AsyncConsole("", input => {
|
|
|
|
try {
|
|
|
|
console.log(JSON.stringify(eval(input)));
|
|
|
|
} catch(e) {
|
|
|
|
console.log(e.toString());
|
|
|
|
}
|
|
|
|
})
|