Hotfix for heroku deployment

This commit is contained in:
Álvaro Gómez Cuenca 2020-12-08 12:31:24 +01:00
commit a9c36ffe71
2 changed files with 17 additions and 1 deletions

View file

@ -1,4 +1,7 @@
using System;
using Cqrs.Hosts;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using System;
namespace Bot_Discord_CSharp
{
@ -6,8 +9,18 @@ namespace Bot_Discord_CSharp
{
static void Main(string[] args)
{
var host = CreateWebHostBuilder(args).
UseKestrel().
UseUrls("http://0.0.0.0:" + Environment.GetEnvironmentVariable("$PORT")).
Build();
host.Run();
Bot bot = new Bot();
bot.RunAsync().GetAwaiter().GetResult();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<StartUp>();
}
}