Wip
This commit is contained in:
parent
e9065db23c
commit
0945ccfd12
@ -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;
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user