mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 21:02:50 +08:00
27 lines
621 B
C#
27 lines
621 B
C#
using System.IO;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Ocelot.ManualTest
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
IWebHostBuilder builder = new WebHostBuilder();
|
|
|
|
builder.ConfigureServices(s => {
|
|
s.AddSingleton(builder);
|
|
});
|
|
|
|
builder.UseKestrel()
|
|
.UseContentRoot(Directory.GetCurrentDirectory())
|
|
.UseStartup<Startup>();
|
|
|
|
var host = builder.Build();
|
|
|
|
host.Run();
|
|
}
|
|
}
|
|
}
|