2.0.0 • Published 12 months ago

@discuit-community/jetstream v2.0.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
12 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

12 months ago

1.0.0

1 year ago

0.3.0

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago