open Dash.NET
open Microsoft.Extensions.Logging
open Giraffe.Core
open Giraffe.ViewEngine

let dslLayout = Html.div []

[<EntryPoint>]
let main args =
    Giraffe.DashApp.initDefault()
    |> Giraffe.DashApp.mapIndex (fun index ->
        { index with 
            Metas = [
                // A description of the app, used by e.g.
                // search engines when displaying search results.
                meta [
                  attr "name" "description"
                  attr "content" "My Description"
                ]
                // A tag that tells Internet Explorer (IE)
                // to use the latest renderer version available
                // to that browser (e.g. Edge)
                meta [
                    attr "http-equiv" "X-UA-Compatible"
                    attr "content" "IE=edge"
                ]
                // A tag that tells the browser not to scale
                // desktop widths to fit mobile screens.
                // Sets the width of the viewport (browser)
                // to the width of the device, and the zoom level
                // (initial scale) to 1.
                //
                // Necessary for "true" mobile support.
                meta [
                    attr "name" "viewport"
                    attr "content" "width=device-width, initial-scale=1.0"
                ]
            ]
        })
    |> Giraffe.DashApp.withLayout dslLayout
    |> Giraffe.DashApp.run args 
        { HostName = "localhost"
          LogLevel = LogLevel.Debug
          ErrorHandler = ((fun ex ->  ex.Message) >> text) }