using JOBot.Proto; using JOBot.TClient; using JOBot.TClient.Commands; using JOBot.TClient.Core.HostedServices; using JOBot.TClient.Core.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder(args) .ConfigureServices((context, services) => { // Настройка DI services.ConfigureServices(context.Configuration); // Фоновый сервис для бота services.AddHostedService(); services.AddScoped(); services.AddSingleton(); services.AddGrpcClient(o => o.Address = new Uri("http://backend:5001")); }) .Build(); await host.RunAsync();