Add persistence, lifecycle improvements, logging and typescript fixes

This commit is contained in:
2026-07-21 14:49:09 +02:00
parent 4855bb882c
commit 6d22275a1f
4 changed files with 233 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
import { createServer, IncomingMessage, ServerResponse } from "http";
import { registerRoutes } from "./routes";
import { WebApi, WebApiDependencies } from "./api";
export function createWebServer(deps: WebApiDependencies, port = 3000) {
const api = new WebApi(deps);
const server = createServer();
registerRoutes(server, api);
server.listen(port, () => {
// no-op: startup is handled by the manager
});
return server;
}