Skip to content

Instantly share code, notes, and snippets.

@btompkins
Created January 15, 2013 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btompkins/4539499 to your computer and use it in GitHub Desktop.
Save btompkins/4539499 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/"), new Uri("http://127.0.0.1:8888/nancy/"), new Uri("http://localhost:8889/nancytoo/"));
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