fix: service not running due to missing http client
This commit is contained in:
parent
14665faa47
commit
59db6ef963
@ -11,13 +11,19 @@ using Microsoft.Extensions.Logging;
|
|||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault;
|
||||||
var builder = Host.CreateApplicationBuilder();
|
var builder = Host.CreateApplicationBuilder();
|
||||||
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
builder.Configuration.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
||||||
|
|
||||||
builder.Services.AddMeiliSearchService();
|
builder.Services.AddMeiliSearchService();
|
||||||
builder.Services.AddSingleton<test>();
|
builder.Services.AddSingleton<test>();
|
||||||
|
|
||||||
builder.Logging.ClearProviders();
|
builder.Logging.ClearProviders();
|
||||||
builder.Logging.AddConsole();
|
builder.Logging.AddConsole();
|
||||||
builder.Logging.SetMinimumLevel(LogLevel.Information);
|
builder.Logging.SetMinimumLevel(LogLevel.Information);
|
||||||
|
|
||||||
builder.Services.AddLogging();
|
builder.Services.AddLogging();
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
app.Services.GetService<test>();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"Meili": {
|
"Meili": {
|
||||||
"Port": 7700,
|
"Port": 7700,
|
||||||
"UiEnabled" : true,
|
"UiEnabled" : true,
|
||||||
"CustomApiKey": false,
|
"CustomApiKey": true,
|
||||||
"ApiKey": "YourOptionalApiKey"
|
"ApiKey": "YourOptionalApiKey"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user