allow passing port as argument
parent
874d7936de
commit
dc5f04ae64
|
|
@ -21,10 +21,15 @@ namespace OFBButte.Api
|
||||||
|
|
||||||
public static IWebHost CreateWebHostBuilder(string[] args)
|
public static IWebHost CreateWebHostBuilder(string[] args)
|
||||||
{
|
{
|
||||||
var host = WebHost.CreateDefaultBuilder(args)
|
var hostBuilder = WebHost.CreateDefaultBuilder(args)
|
||||||
.UseStartup<Startup>()
|
.UseStartup<Startup>();
|
||||||
.UseUrls("http://localhost:29021")
|
|
||||||
.Build();
|
if (args.Length >= 1)
|
||||||
|
{
|
||||||
|
hostBuilder.UseUrls($"http://localhost:{args[0]}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var host = hostBuilder.Build();
|
||||||
|
|
||||||
using(var scope = host.Services.CreateScope())
|
using(var scope = host.Services.CreateScope())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue