164f121d22
fixes to work with mono
35 lines
873 B
C#
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();
|
|
}
|
|
}
|
|
}
|
|
}
|