A real-time chat application built with OCaml, Dream (with Lwt), and WebSockets.
- Real-time messaging using WebSockets
- Simple and clean web interface
- Built with OCaml and Dream web framework
- OCaml (>= 4.08.0)
- opam (OCaml package manager)
- dune (build system)
- Create a new opam switch for the project:
opam switch create . --deps-only- Install dependencies:
opam install dream yojson lwt- Build the project:
dune build- Run the server:
dune exec src/server.exe- Open your browser and navigate to:
http://localhost:8080
src/server.ml- HTTP and WebSocket serverchat_room.ml- Chat room logic and client managementdune- Build configuration
static/index.html- Chat UIclient.js- WebSocket client code