Switched to Elm / Suave

It's like F# on the client side - sweet!
This commit is contained in:
Daniel J. Summers
2016-12-11 19:39:06 -06:00
parent d3a80b9ceb
commit bde45c8554
45 changed files with 10698 additions and 1216 deletions

22
src/Program.fs Normal file
View File

@@ -0,0 +1,22 @@
// Learn more about F# at http://fsharp.org
open System.IO
open Suave
open Suave.Filters
open Suave.Operators
let app : WebPart =
choose [
//GET >=> path "/" >=> Files.file "index.html"
//GET >=> path "" >=> Files.file "index.html"
GET >=> Files.browseHome
GET >=> Files.browseFileHome "index.html"
RequestErrors.NOT_FOUND "Page not found."
]
[<EntryPoint>]
let main argv =
let config =
{ defaultConfig with homeFolder = Some (Path.GetFullPath "./wwwroot/") }
startWebServer config app
0 // return an integer exit code