Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/Time. Oh no another time tracking app!
Something went wrong. Try again.
1.2 kB · 44 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445namespace Time.Server
open Microsoft.AspNetCoreopen Microsoft.AspNetCore.Authentication.Cookiesopen Microsoft.AspNetCore.Builderopen Microsoft.AspNetCore.Hostingopen Microsoft.Extensions.DependencyInjectionopen Boleroopen Bolero.Remoting.Serveropen Bolero.Serveropen Timeopen Bolero.Templating.Server
module Program =
[<EntryPoint>] let main arguments = let builder = WebApplication.CreateBuilder(arguments) builder.Services.AddRazorPages() |> ignore builder.Services.AddServerSideBlazor() |> ignore builder.Services.AddBoleroHost(server = true) |> ignore#if DEBUG builder.Services.AddHotReload(fun configuration -> { configuration with Directory = __SOURCE_DIRECTORY__ + "/../Time.Client" }) |> ignore#endif
let app = builder.Build()
app .UseHttpsRedirection() .UseStaticFiles() .UseRouting() .UseBlazorFrameworkFiles() .UseEndpoints(fun endpoints ->#if DEBUG endpoints.UseHotReload() #endif endpoints.MapBlazorHub() |> ignore
endpoints.MapFallbackToBolero(Index.page) |> ignore) |> ignore
app.Run() 0