Update to NetCore 3.1, added Kestrel for REST api and few basic endpoints.

This commit is contained in:
Karolis2011
2020-01-04 14:42:57 +02:00
parent 402d1943c1
commit 0e06afd5e6
8 changed files with 171 additions and 53 deletions

View File

@@ -14,6 +14,7 @@ namespace ASS.Server.Services
IServiceProvider _sp;
ILogger logger;
IConfiguration config;
public bool IsInitilized { get; private set; } = false;
public GrpcService(IServiceProvider sp) : this(sp.GetRequiredService<IConfiguration>())
{
@@ -29,6 +30,7 @@ namespace ASS.Server.Services
public void Initialize()
{
IsInitilized = true;
Services.Add(API.Instance.BindService(_sp.GetRequiredService<InstanceService>()));
Start();
logger.LogInformation($"gRPC server listening on {config["GRPC:Host"]}:{config["GRPC:Port"]}");