32 lines
849 B
C#
32 lines
849 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace esh.core.web
|
|
{
|
|
public static class Web
|
|
{
|
|
public static Core Core = new Core();
|
|
public static void Main(string[] args)
|
|
{
|
|
CreateWebHostBuilder(args).Build().Run();
|
|
}
|
|
|
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.ConfigureAppConfiguration((hostingContext, config) => {
|
|
config.AddJsonFile(
|
|
Path.Combine(
|
|
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase),
|
|
"appsettings.json"),
|
|
true,
|
|
true); })
|
|
.UseStartup<Startup>();
|
|
}
|
|
} |