2.0.0 • Published 8 months ago

@discuit-community/jetstream v2.0.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
8 months ago

@discuit-community/jetstream

a real-time websocket for new posts and comments (soon) on discuit.

usage

running locally

# install dependencies
bun install

# start jetstream
bun start

# or run in development mode with auto-restart
bun dev

connecting to the jetstream

clients can connect to jetstream using a WebSocket:

const ws = new WebSocket('ws://localhost:3001/ws');

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  switch (data.type) {
    case 'new_post':
      console.log('new post:', data.post);
      break;
  }
};
2.0.0

8 months ago

1.0.0

9 months ago

0.3.0

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago