Skip to content

Commit

Permalink
Use Bun pub/sub in WebSocket server
Browse files Browse the repository at this point in the history
Instead of custom event emitter.
Also other cleanup related to the move to Bun

Signed-off-by: Brian Evans <[email protected]>
  • Loading branch information
mrbrianevans committed Sep 23, 2023
1 parent ef59bcf commit 242b28c
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 830 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:

event-publisher:
build: server
command: bun run stream-pub
command: bun run src/redis/streamToRedis.ts
environment:
PUBSUB_REDIS_IP: redis
env_file:
Expand All @@ -42,7 +42,7 @@ services:

event-subscriber:
build: server
command: bun run stream-sub
command: bun run src/redis/streamFromRedis.ts
environment:
PUBSUB_REDIS_IP: redis
logging:
Expand Down
3 changes: 2 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
},
"devDependencies": {
"@types/node": "^18.11.9",
"bun-types": "^1.0.3",
"mitata": "^0.1.6",
"typescript": "^4.8.4"
},
"dependencies": {
"@streamparser/json-node": "^0.0.15",
"JSONStream": "^1.3.5",
"bun-types": "^1.0.3",
"elysia": "^0.7.12",
"genson-js": "^0.0.8",
"pino": "^8.7.0",
Expand Down
Loading

0 comments on commit 242b28c

Please sign in to comment.