Skip to content

Commit 0636ae2

Browse files
authored
Merge pull request #1 from amirrezapanahi/makeProxy-inclusion
Update fable-remoting.md to accomodate features from safe server metapackage
2 parents c5b9e12 + c4e5cec commit 0636ae2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/recipes/client-server/fable-remoting.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ let myApi =
5959
|> Remoting.buildProxy<IMyApi>
6060
```
6161

62+
> Note: We have made your life easier by creating Metapackages which abstract some of this boilerplate. You can also create the client proxy like so:
63+
> ```fsharp
64+
> open SAFE
65+
>
66+
> let myApi = Api.makeProxy<IMyApi> ()
67+
> ```
68+
6269
#### 7. Make calls to the Server
6370
Replace the following two lines in the `init` function in `Client.fs`:
6471
@@ -74,4 +81,4 @@ let cmd = Cmd.OfAsync.perform myApi.hello () GotHello
7481
```
7582

7683
## Done!
77-
At this point, the app should work just as it did before. Now, expanding the API and adding a new endpoint is as easy as adding a new field to the API protocol we defined in `Shared.fs`, editing the `myApi` record in `Server.fs` with the implementation, and finally making calls from the proxy.
84+
At this point, the app should work just as it did before. Now, expanding the API and adding a new endpoint is as easy as adding a new field to the API protocol we defined in `Shared.fs`, editing the `myApi` record in `Server.fs` with the implementation, and finally making calls from the proxy.

0 commit comments

Comments
 (0)