HomeModule.cs
434 Bytes
namespace CCE.Hosting.Netcore
{
using CCE.Configuration;
using Nancy;
public class HomeModule : NancyModule
{
public HomeModule(ICCEBusinessContext businessContext)
{
Get(
"/",
parameters =>
Response.AsJson(businessContext));
Get("/Environment/{key}", x => {
string value;
businessContext.CCEContext.Environment.TryGetValue(x.key, out value);
return Response.AsJson(value);
});
}
}
}