From 7fb7786b88e89693d43736b8436a888dc93fa8e2 Mon Sep 17 00:00:00 2001 From: iwedaz Date: Sun, 14 Jan 2024 20:51:19 +0100 Subject: [PATCH] Add requirements to use static files middleware --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f0ca46..47f87d5 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,13 @@ Add this line before ```var app = builder.Build();``` and after your DbContexts builder.Services.AddCoreAdmin(); ``` -You need to make sure Endpoints are enabled as they don't appear to be in the default templates. For example, add the following before ```app.Run();```: +You need to make sure Endpoints are enabled as they don't appear to be in the default templates. +Also [static files middleware](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files) has to be enabled. + +For example, add the following before ```app.Run();```: ```csharp +app.UseStaticFiles(); app.MapDefaultControllerRoute(); ```