18 lines
478 B
TypeScript
18 lines
478 B
TypeScript
import {config, ensureDirectoriesExist} from "./src/config.ts";
|
|
import {UnitManager} from "./src/bones/Unit.ts";
|
|
import {ThreadRefresher} from "./src/units/threads.ts";
|
|
import {HttpServer} from "./src/units/http-server.ts";
|
|
|
|
;(async () => {
|
|
await ensureDirectoriesExist()
|
|
|
|
const manager = new UnitManager()
|
|
|
|
await manager.addUnit(new ThreadRefresher)
|
|
if ( config.http.enabled ) {
|
|
await manager.addUnit(new HttpServer)
|
|
}
|
|
|
|
await manager.run()
|
|
})()
|