This commit is contained in:
Rizky 2024-12-20 14:40:08 +07:00
parent fa9cbf5f12
commit a724792eb8
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,5 @@
export const ipcSend = (
msg: { type: "init" } | { type: "ready"; port: number }
) => {};
) => {
process?.send?.(msg);
};

View File

@ -18,7 +18,9 @@ startup("site", async () => {
g.server = Bun.serve({
fetch(request, server) {},
websocket: { message(ws, message) {} },
port: 0,
});
ipcSend({ type: "ready", port: g.server.port });
}
}
});