Fable SPA deployed to Azure functions.
There are 3 x Projects:
Contains a simple User
type that used on front end and the back end. Makes use of Thoth.Json
& Thoth.Json.Net
.
Fable App using preact.js
for dom rendering & Thoth.Fetch
for Fetch API.
Makes use of HtmlWebpackPlugin & CleanWebpackPlugin for hashing of bundle.js
One thing to note is never open Fable.Core.JS
as it does not play nicely with System
, Promise
etc.
2 x Function end points: 1 for static content, the other for json.
Makes use of .fsproj
globbing
npm install -g azure-functions-core-tools
dotnet fsi build.fsx
Or build the FableApp
project first dotnet build src; npm run-script build
, followed by the FunctionApp
project.
cd FunctionApp; func start
Build and start the function app running locally in one go
dotnet fsi run.fsx
Deploy to Azure Functions :satisfied: live app here