https://github.com/zing-rsa/ts-ws
Experimenting with websockets in typescript
https://github.com/zing-rsa/ts-ws
chatroom deno websockets
Last synced: 2 months ago
JSON representation
Experimenting with websockets in typescript
- Host: GitHub
- URL: https://github.com/zing-rsa/ts-ws
- Owner: zing-rsa
- Created: 2023-06-29T15:20:45.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T07:15:55.000Z (almost 3 years ago)
- Last Synced: 2025-07-02T08:10:29.537Z (12 months ago)
- Topics: chatroom, deno, websockets
- Language: TypeScript
- Homepage:
- Size: 159 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# A websockets based chatroom project
Users will provide a username and be allowed to enter a chatroom where they can share messages with other users in realtime
Hosted [here](https://chatr.zing-rsa.co.za/).
### Usage notes
If you would like to simulate multiple users chatting you can open 2 sessions, but it's best if they are on different browsers. The app uses cookies to keep track of sessions, and most browsers save cookies globally across tabs(even incognito) so your sessions will conflict. The easiest is to use 2 different browsers.
### Tech
`Frontend/Backend`: [Deno Fresh](https://github.com/denoland/fresh) 🍋
`DB`: MongoDB
`WS`: Deno Websockets
> `serve-ws/` contains initial Websocket server before I migration to the fresh backend
### Running
1. create a `.env` file in `fresh-ws/`:
```
FRESH_ENVIRONMENT="dev"
MONGO_URL=""
APP_URL="localhost:8000"
WS_PTCL="ws://"
HTTP_PTCL="http://"
```
2. `cd fresh-ws`
3. `deno task start` (make sure to [install deno](https://deno.land/manual@v1.35.1/getting_started/installation))