Last active
June 27, 2024 20:26
-
-
Save object/54778d46f904d947166b787fbbf5a1d3 to your computer and use it in GitHub Desktop.
Fable workshop (2024). Step 10. App.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
open Elmish.Bridge | |
#if DEBUG | |
open Elmish.Debug | |
#endif | |
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.RemoteEvent)) | |
#if DEBUG | |
|> Program.withConsoleTrace | |
#endif | |
|> Program.withReactSynchronous "elmish-app" | |
#if DEBUG | |
|> Program.withDebugger | |
#endif | |
|> Program.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment