27 lines
776 B
C#
27 lines
776 B
C#
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Hosting;
|
|
using System.Diagnostics;
|
|
using System.IO;
|
|
|
|
namespace Netmash.Test.Api
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var pathToExe = Process.GetCurrentProcess().MainModule.FileName;
|
|
var pathToContentRoot = Path.GetDirectoryName(pathToExe);
|
|
Directory.SetCurrentDirectory(pathToContentRoot);
|
|
|
|
CreateHostBuilder(args).Build().Run();
|
|
}
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
Host.CreateDefaultBuilder(args)
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
{
|
|
webBuilder.UseStartup<Startup>();
|
|
});
|
|
}
|
|
}
|