Updated readme

This commit is contained in:
TomPallister 2016-10-25 22:07:27 +01:00
parent ddc36fc51f
commit 51f8cdceeb

View File

@ -36,7 +36,17 @@ All versions can be found [here](https://www.nuget.org/packages/Ocelot/)
An example startup using a yaml file for configuration can be seen below. Currently this is the only way to get configuration into Ocelot. An example startup using a yaml file for configuration can be seen below. Currently this is the only way to get configuration into Ocelot.
` `
public class Startup namespace TestOcelot
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
public class Startup
{ {
public IConfigurationRoot Configuration { get; } public IConfigurationRoot Configuration { get; }
@ -71,6 +81,8 @@ public class Startup
app.UseOcelot(); app.UseOcelot();
} }
} }
}
` `
An example configuration can be found [here](https://github.com/TomPallister/Ocelot/blob/develop/test/Ocelot.ManualTest/configuration.yaml) An example configuration can be found [here](https://github.com/TomPallister/Ocelot/blob/develop/test/Ocelot.ManualTest/configuration.yaml)