IW4M-Admin/WebfrontCore/Program.cs
RaidMax 164f121d22 rcon command formatted to work in linux
fixes to work with mono
2018-04-07 14:49:00 -05:00

35 lines
873 B
C#

using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace WebfrontCore
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.Build();
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseUrls(config["Web:Address"])
.Build();
if (!SharedLibrary.Utilities.IsRunningOnMono())
{
host.Run();
}
else
{
Console.ReadLine();
}
}
}
}