You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
31 lines
1.0 KiB
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace Kafka2Doris
|
|
{
|
|
internal class Program
|
|
{
|
|
private static void Main(string[] args)
|
|
{
|
|
Host.CreateDefaultBuilder(args)
|
|
.ConfigureLogging(o =>
|
|
{
|
|
o.AddConsole();
|
|
})
|
|
.ConfigureAppConfiguration((hostingContext, configuration) =>
|
|
{
|
|
configuration
|
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
|
|
.AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", true, true);
|
|
})
|
|
.ConfigureServices((hostingContext, services) =>
|
|
{
|
|
services.AddHostedService<Worker>();
|
|
})
|
|
.Build()
|
|
.Run();
|
|
}
|
|
}
|
|
} |