2024-10-01 01:58:44 +00:00
|
|
|
import m from "mithril";
|
2024-10-05 02:57:21 +00:00
|
|
|
import { createChatApp } from "./components/ChatApp";
|
|
|
|
import { createWebSocket } from "./websocket";
|
|
|
|
import { Sessions } from "./session";
|
2024-10-01 02:07:05 +00:00
|
|
|
|
2024-10-05 02:57:21 +00:00
|
|
|
// open the WS to the server
|
|
|
|
const ws = createWebSocket();
|
|
|
|
const session = new Sessions();
|
|
|
|
const ChatApp = createChatApp({ ws, session });
|
2024-10-01 01:58:44 +00:00
|
|
|
m.mount(document.getElementById("app"), ChatApp);
|