2020-01-26 00:27:45 +00:00
|
|
|
|
using Autofac.Extensions.DependencyInjection;
|
|
|
|
|
|
2019-07-09 18:39:29 +00:00
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2020-01-26 00:27:45 +00:00
|
|
|
|
using Microsoft.Extensions.Hosting;
|
2019-07-09 18:39:29 +00:00
|
|
|
|
|
2020-02-12 14:16:19 +00:00
|
|
|
|
using PluralKit.Core;
|
|
|
|
|
|
2019-07-09 18:39:29 +00:00
|
|
|
|
namespace PluralKit.API
|
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
InitUtils.Init();
|
2020-01-26 00:27:45 +00:00
|
|
|
|
CreateHostBuilder(args).Build().Run();
|
2019-07-09 18:39:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-01-26 00:27:45 +00:00
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
|
|
|
Host.CreateDefaultBuilder(args)
|
|
|
|
|
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
|
|
|
|
|
.ConfigureWebHostDefaults(whb => whb
|
|
|
|
|
|
|
|
|
|
.UseConfiguration(InitUtils.BuildConfiguration(args).Build())
|
|
|
|
|
.ConfigureKestrel(opts => { opts.ListenAnyIP(5000); })
|
|
|
|
|
.UseStartup<Startup>());
|
2019-07-09 18:39:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|