blob: bf8d72be6469a95e229d0e925883fe3928bcc415 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
open Microsoft.AspNetCore.Builder
open Microsoft.Extensions.Hosting
open Falco
open Falco.Routing
open Aamukampa.Core
open Aamukampa.Web.Modules
let endpoints = [
get "/" Index.get
]
[<EntryPoint>]
let main args =
let builder = WebApplication.CreateBuilder(args)
let app = builder.Build()
if (Config.pathBase.TrimEnd('/')) <> "" then
app.UsePathBase(Config.pathBase) |> ignore
app.MapStaticAssets() |> ignore
app
.UseRouting()
.UseFalco(endpoints)
.Run()
0 // Exit code
|