This is a simple Fable Node.js app.
- dotnet SDK 2.1 or higher
- node.js with npm
- An F# editor like Visual Studio, Visual Studio Code with Ionide or JetBrains Rider.
- Install JS dependencies:
npm install
- Build Node.js app
npm run build
- Try Node.js app
node build/App.js
JS dependencies are declared in package.json
, while package-lock.json
is a lock file automatically generated.
Fable-splitter is a standalone tool which outputs separated files instead of a single bundle. Here all the js files are put into the build
dir. And the main entry point is our App.js
file.
The sample only contains two F# files: the project (.fsproj) and a source file (.fs) in the src
folder.