18 lines
562 B
TypeScript
18 lines
562 B
TypeScript
![]() |
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
// Author: Sascha Nitsch https://contentnation.net/@grumpydevelop
|
||
|
|
||
|
import { MyWebSocketServer } from './websockets/server';
|
||
|
import { WorldSim } from './worldsim';
|
||
|
|
||
|
const worldSim = new WorldSim();
|
||
|
const webserver = new MyWebSocketServer(worldSim);
|
||
|
webserver.start();
|
||
|
worldSim.start(2)
|
||
|
.then( () => {
|
||
|
webserver.stop().then( () => {
|
||
|
//console.log("stopped", process._getActiveRequests());//,process._getActiveHandles(), );
|
||
|
//console.log("stopped", process._getActiveHandles());
|
||
|
process.exit(0);
|
||
|
});
|
||
|
});
|