Skip to content

Instantly share code, notes, and snippets.

@supertom44
Created July 3, 2016 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supertom44/62e8ba4a542e7f884d887c0dcc5cbe83 to your computer and use it in GitHub Desktop.
Save supertom44/62e8ba4a542e7f884d887c0dcc5cbe83 to your computer and use it in GitHub Desktop.
module SuaveDotLiquidSample
open Suave
open Suave.Operators
open Suave.Filters
DotLiquid.setTemplatesDir (__SOURCE_DIRECTORY__ + "/templates")
type Person = { Name : string; Age : int }
let people = [{Name = "Thomas"; Age = 29};{Name = "Martin"; Age = 35}]
let index = DotLiquid.page "index.html" (people)
startWebServer defaultConfig (path "/" >=> index)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment