Created
August 7, 2018 05:27
-
-
Save AkosLukacs/57740e941200b69c35f6690c717af615 to your computer and use it in GitHub Desktop.
Configure miniprofiler in a Giraffe app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let configureApp (app : IApplicationBuilder) = | |
app.UseDefaultFiles() | |
.UseStaticFiles() | |
// this line | |
.UseMiniProfiler() | |
.UseGiraffe webApp | |
let configureServices (services : IServiceCollection) = | |
services.AddGiraffe() |> ignore | |
// IMemoryCache is required for MiniProfiler's in-memory storage | |
services.AddMemoryCache() | |
// Add MiniProfiler itself | |
.AddMiniProfiler(fun mp -> | |
// Config options for ASP.NET Core: https://miniprofiler.com/dotnet/AspDotNetCore | |
mp.ShowControls <- true | |
mp.PopupRenderPosition <- RenderPosition.Right | |
// TODO: set up authentication, authorization! | |
()) |> ignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment