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