Skip to content

Instantly share code, notes, and snippets.

@davidalpert
Created July 13, 2011 05:11
Show Gist options
  • Save davidalpert/1079757 to your computer and use it in GitHub Desktop.
Save davidalpert/1079757 to your computer and use it in GitHub Desktop.
namespace Nancy.Demo.Hosting.Self
{
using System;
using System.Diagnostics;
using Nancy.Hosting.Self;
class Program
{
static void Main()
{
var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"));
nancyHost.Start();
Console.WriteLine("Nancy now listening - navigating to http://localhost:8888/nancy/. Press enter to stop");
Process.Start("http://localhost:8888/nancy/");
Console.ReadKey();
nancyHost.Stop();
Console.WriteLine("Stopped. Good bye!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment