- streaming-counter.ds: reactive counter with 'stream counter on ws://...' - streaming-receiver.ds: remote receiver with 'stream from ws://...' - E2E verified: compiles to streaming JS, connects to relay, sends signal diffs
15 lines
394 B
Text
15 lines
394 B
Text
-- DreamStack Streaming Receiver
|
|
-- Connects to a remote stream and renders the received signal state.
|
|
--
|
|
-- Run with:
|
|
-- (source must be running first)
|
|
-- dreamstack dev examples/streaming-receiver.ds --port 3001
|
|
|
|
let remote = stream from "ws://localhost:9100"
|
|
|
|
view main =
|
|
column [
|
|
text "📡 Remote Stream"
|
|
text "Count: {remote.count}"
|
|
text "Doubled: {remote.doubled}"
|
|
]
|