feat ocelot

This commit is contained in:
2024-03-08 14:48:41 +08:00
parent 40dd39adc9
commit eca9ca3a44
8 changed files with 109 additions and 0 deletions

16
Src/Gateway/Program.cs Normal file
View File

@@ -0,0 +1,16 @@
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddJsonFile("ocelot.json", true, true);
// Add services to the container.
builder.Services.AddOcelot();
var app = builder.Build();
// Configure the HTTP request pipeline.
app.UseOcelot().Wait();
app.Run();