Skip to content

Commit

Permalink
Code review feedback, simplified the code and removed call to UseRouting
Browse files Browse the repository at this point in the history
  • Loading branch information
Vake93 committed May 9, 2021
1 parent 8e62ac5 commit 42ebd1c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions dotnet_grpc_bench/GreeterServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
});
});

builder.WebHost.ConfigureLogging(logging =>
{
logging.ClearProviders();
});
builder.Logging.ClearProviders();

builder.Services.AddGrpc(o => o.IgnoreUnknownServices = true);
builder.Services.Configure<RouteOptions>(c => c.SuppressCheckForUnhandledSecurityMetadata = true);
Expand All @@ -51,10 +48,6 @@

app.Lifetime.ApplicationStarted.Register(() => Console.WriteLine("Application started."));
app.UseMiddleware<ServiceProvidersMiddleware>();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<GreeterService>();
});
app.MapGrpcService<GreeterService>();

await app.RunAsync();

0 comments on commit 42ebd1c

Please sign in to comment.