Skip to content
  • This project
    • Loading...
  • Sign in

Gabor Felegyhazi / ContextConfigEnv

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • ContextConfigEnv
  • CCE.Hosting.Netcore
  • HomeModule.cs
  • Gabor Felegyhazi's avatar
    Kesz · c7ee5b2c
    c7ee5b2c
    Gabor Felegyhazi authored 2017-08-29 11:27:03 +0200
HomeModule.cs 434 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
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);
			});
		}
	}
}