2025-01-21 02:50:40 +00:00
|
|
|
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";
|
2024-12-31 02:36:12 +00:00
|
|
|
|
2025-01-04 06:20:47 +00:00
|
|
|
;(async () => {
|
|
|
|
await ensureDirectoriesExist()
|
2025-01-21 02:50:40 +00:00
|
|
|
|
|
|
|
const manager = new UnitManager()
|
|
|
|
|
|
|
|
await manager.addUnit(new ThreadRefresher)
|
|
|
|
if ( config.http.enabled ) {
|
|
|
|
await manager.addUnit(new HttpServer)
|
|
|
|
}
|
|
|
|
|
|
|
|
await manager.run()
|
2025-01-04 06:20:47 +00:00
|
|
|
})()
|