Skip to content

Commit

Permalink
Reverted unintended hosting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TSchmiedlechner committed Oct 1, 2021
1 parent bf95f3a commit f8803b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public async Task StartAsync()
}

var uri = new Uri(URL);
_host = new WebHostBuilder()
_host = WebHost
.CreateDefaultBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.ConfigureServices(services =>
{
services.AddRouting();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ public async Task StartAsync(string url, T instance, LogLevel logLevel)

Url = url;
var uri = new Uri(url);
_host = new WebHostBuilder()
.UseContentRoot(Directory.GetCurrentDirectory())
_host = WebHost
.CreateDefaultBuilder()
.UseKestrel()
.ConfigureServices(services =>
{
services.AddLogProviders(logLevel);
services.AddMvc();
services.AddMvc(options =>
{
options.Conventions.Add(new IncludeControllerConvention<TController>());
});
services.AddSingleton<T>(instance);
})
.Configure(app =>
Expand Down

0 comments on commit f8803b6

Please sign in to comment.