Skip to content

Instantly share code, notes, and snippets.

@fzankl
Created January 24, 2021 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzankl/269f84e094b1c61f6f80c8b94d10a3b1 to your computer and use it in GitHub Desktop.
Save fzankl/269f84e094b1c61f6f80c8b94d10a3b1 to your computer and use it in GitHub Desktop.
gRPC in ASP.NET Core
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<DefaultFooService>();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment