This commit is contained in:
Brandon Watson 2021-03-05 20:45:26 -05:00
parent e9065db23c
commit 0945ccfd12
3 changed files with 7 additions and 5 deletions

View File

@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Grpc.Core;
using Microsoft.Extensions.Logging;
using Aurora.Cursor;

View File

@ -18,6 +18,7 @@ namespace Aurora
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddGrpcReflection();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@ -26,6 +27,7 @@ namespace Aurora
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseRouting();
@ -34,6 +36,10 @@ namespace Aurora
{
endpoints.MapGrpcService<SignalService>();
if (env.IsDevelopment())
{
endpoints.MapGrpcReflectionService();
}
endpoints.MapGet("/", async context =>
{
await context.Response.WriteAsync("Communication with gRPC endpoints must be made through a gRPC client. To learn how to create a client, visit: https://go.microsoft.com/fwlink/?linkid=2086909");

View File

@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.27.0" />
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.35.0" />
</ItemGroup>
</Project>