I created this template to have a nice starting point to test some new ideas. At the moment it supports:
- REST API + updates via SignalR to other clients when something has changed (e.g. Todo added)
- SignalR RPC API Elmish-style (Counter +/-)
- SignalR RPC API Feliz-React-style (Counter +/-)
Missing:
- Server streaming
- Client streaming
You'll need to install the following pre-requisites in order to build SAFE applications
- The .NET Core SDK 3.1 (for Fable)
- The .NET Core SDK 5.0 (for Server)
- npm package manager.
- Node LTS.
Before you run the project for the first time only you must install dotnet "local tools" with this command:
dotnet tool restore
Open two terminals.
On first terminal do:
cd src/Server/
dotnet watch run
On second terminal do:
cd src/Client/
npm start
Click on the link provided by webpack in the terminal window to open a browser window. Open another browser window with the same URL to see updates.
Important: Files from Shared.fsprj are currently not under watch of webpack. Modify something in the server files then something in Index.fs
You will find more documentation about the used F# components at the following places:
Other good readings: