We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a65f37 commit 354de47Copy full SHA for 354de47
src/OneScript.Web.Server/WebServer.cs
@@ -77,16 +77,18 @@ public void Run()
77
78
private void ConfigureApp()
79
{
80
- var builder = WebApplication.CreateBuilder();
+ var appOptions = new WebApplicationOptions
81
+ {
82
+ ContentRootPath = _contentRoot ?? "."
83
+ };
84
+
85
+ var builder = WebApplication.CreateBuilder(appOptions);
86
builder.WebHost.ConfigureKestrel(options =>
87
88
options.AllowSynchronousIO = true;
89
options.ListenAnyIP(Port);
90
});
91
- if (_contentRoot != null)
- builder.WebHost.UseContentRoot(_contentRoot);
-
92
_app = builder.Build();
93
94
if (_useStaticFiles)
0 commit comments