Hotfix for heroku deployment
This commit is contained in:
parent
2ea67a678e
commit
a9c36ffe71
2 changed files with 17 additions and 1 deletions
|
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue