Skip to content

Instantly share code, notes, and snippets.

@object
Last active June 27, 2024 19:45
Show Gist options
  • Save object/9c2344d8223011129797e2feba62d236 to your computer and use it in GitHub Desktop.
Save object/9c2344d8223011129797e2feba62d236 to your computer and use it in GitHub Desktop.
Fable workshop (2024). Step 8. App.fs
module App
open Elmish
open Elmish.React
open Elmish.Bridge
open Update
open View
Program.mkProgram init update view
|> Program.withBridgeConfig (
Bridge.endpoint "ws://localhost:5000/socket"
|> Bridge.withUrlMode Raw
|> Bridge.withMapping (fun (x : Shared.Sockets.ClientMessage) -> x |> Messages.MediaSetEvent))
|> Program.withReactSynchronous "elmish-app"
|> Program.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment