Skip to content

Commit

Permalink
fix: README
Browse files Browse the repository at this point in the history
  • Loading branch information
aablinov committed May 13, 2024
1 parent 642eef6 commit b7cafe9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
src="https://user-images.githubusercontent.com/3010927/210603861-4b265489-a4a7-4d2a-bceb-40ceccebcd96.jpg">


Real-time page updates for your Rails app over SSE with [Mercure](https://mercure.rocks) or [Fanout Cloud](https://fanout.io/cloud) and [Hotwire Turbo](https://turbo.hotwired.dev/handbook/streams#integration-with-server-side-frameworks).
Real-time page updates for your Rails app over SSE with [Mercure](https://mercure.rocks), [Fanout Cloud](https://fanout.io/cloud) or [AnyCable](https://anycable.io/) and [Hotwire Turbo](https://turbo.hotwired.dev/handbook/streams#integration-with-server-side-frameworks).

* **Uses [SSE](https://html.spec.whatwg.org/multipage/server-sent-events.html)**. No more websockets, client libraries, JS code and handling reconnects. Just an HTTP connection. Let the [browser](https://caniuse.com/eventsource) do the work.
* **Seamless Hotwire integration.** Use it exactly like [ActionCable](https://github.com/hotwired/turbo-rails#come-alive-with-turbo-streams). Drop-in replacement for `broadcast_action_to` and usual helpers.
Expand Down Expand Up @@ -66,6 +66,14 @@ We only support the cloud version today. To use [Fanout](https://fanout.io/cloud

Coming soon.

#### AnyCable

```
anycable-go --host=localhost --port=8080 --sse --broadcast_adapter=http --broadcast_key=test --public_streams --noauth
```

Coming soon.

## Usage

If you are familiar with broadcasting from ActionCable, usage would be extremely familiar:
Expand Down Expand Up @@ -124,6 +132,11 @@ Turbo::Train.configure do |config|
fanout.service_id = ...
fanout.fastly_key = ...
end

config.server :anycable do |fanout|
ac.anycable_url = 'http://0.0.0.0:8080'
ac.broadcast_key = 'test'
end
end
```

Expand Down

0 comments on commit b7cafe9

Please sign in to comment.