Skip to content

darthwalsh/StatusServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StatusServer NuGet Version

Display status history in a web site simple .NET web server.

Simple add some status you care about:

	public class MyStatus : Status
	{
		protected override void Verify() {
			File.ReadAllText("This file isn't here...");
		}
	}

	public class GoogleStatus : HttpStatus
	{
		protected override Uri Uri {
			get { return new Uri("http://google.com"); }
		}
	}
	
	class Program
	{
		static void Main(string[] args) {
			Status.Initialize();

			using (NancyHost host = new NancyHost(
				new HostConfiguration { RewriteLocalhost = false },
				new Uri("http://localhost:8080"))) {
				host.Start();

				Console.WriteLine("Press [Enter] to close");
				Console.ReadLine();
        
				Console.WriteLine("Shutting down gracefully...");
				Status.ShutDown();
			}
		}
	}

and you're running a web server!

MyStatus Could not find file 'c:\Example\bin\Debug\This file isn't here'.
GoogleStatus

Buidling it

	git clone https://github.com/darthwalsh/StatusServer
	nuget restore
	msbuild

About

Display status history from this simple .NET web server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published