Created
January 15, 2013 15:35
-
-
Save btompkins/4539499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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