Hotfix, again...

This commit is contained in:
Álvaro Gómez Cuenca 2020-12-08 13:27:34 +01:00
commit 7f80bedbf5

View file

@ -2,6 +2,7 @@
using Microsoft.AspNetCore; using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using System; using System;
using System.IO;
namespace Bot_Discord_CSharp namespace Bot_Discord_CSharp
{ {
@ -9,18 +10,18 @@ namespace Bot_Discord_CSharp
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
var host = CreateWebHostBuilder(args). var host = new WebHostBuilder()
UseKestrel(). .UseKestrel()
UseUrls("http://0.0.0.0:" + Environment.GetEnvironmentVariable("$PORT")). .UseContentRoot(Directory.GetCurrentDirectory())
Build(); .UseIISIntegration()
.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:" + Environment.GetEnvironmentVariable("$PORT"))
.Build();
host.Run(); host.Run();
Bot bot = new Bot(); Bot bot = new Bot();
bot.RunAsync().GetAwaiter().GetResult(); bot.RunAsync().GetAwaiter().GetResult();
} }
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
} }
} }