If you are interested in a full-stack F# solution that covers both the backend (using .NET) and the frontend (using Fable), check out the SAFE-Stack.
Download a Fable sample
This repository contains several samples ready to use, each located in its own folder.
JS dependencies are listed in the
package.jsonfile. If you are using npm, you can run
npm install, which will download the packages to the
node_modulesfolder and create a lock file.
Depending on whether you're using Nuget or Paket, .NET dependencies will be listed in the
paket.referencesfiles. You can install them by running
dotnet restore, but this is already automatically done by Fable.
Build & run the app
Now that we're done with the dependencies, let's start our app in watch mode. Depending on the kind of template the instructions my differ.
For web samples, unless advised, it will always be
Then you'll be able to access your project from http://localhost:8080/ with your favorite browser.
If you now open the project with your code editor, you can make some changes in the
App.fsfile located in the
srcfolder. Save it and if the compilation succeeds you should be able to see your changes directly in your browser.
For Node.js samples, unless advised, it will always be
Then you'll be able see the generated JS files in the