A simple chat app written with deno.js
Requires tsc
(typescript compiler) & deno
(deno.js)
- Clone the repo
- Change the const
WSSERVER
inscript.ts
to "YOUR_LOCAL_IP:8081" - Run these commands
chmod +x run
./run
- Go to SERVER_COMPUTER_LOCAL_IP:8080 to see the webpage
The backend is written with deno.js, which serves a webpage and a websocket server asynchronously. The webpage is served on port 8080, with the frontend javascript.
The websocket server is used to communicate with each of the clients, using a Message class that is serialized into json. This is how the text messages and name updates are sent to each client.