mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Add API listen port configuration
This commit is contained in:
parent
2005ce3296
commit
3617d5e894
4 changed files with 14 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using Autofac.Extensions.DependencyInjection;
|
||||
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
|
@ -21,7 +22,10 @@ namespace PluralKit.API
|
|||
.ConfigureWebHostDefaults(whb => whb
|
||||
|
||||
.UseConfiguration(InitUtils.BuildConfiguration(args).Build())
|
||||
.ConfigureKestrel(opts => { opts.ListenAnyIP(5000); })
|
||||
.ConfigureKestrel(opts =>
|
||||
{
|
||||
opts.ListenAnyIP(opts.ApplicationServices.GetRequiredService<ApiConfig>().Port);
|
||||
})
|
||||
.UseStartup<Startup>());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue