deployment-talks/chat-app/frontend/index.js

11 lines
354 B
JavaScript
Raw Normal View History

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