Created
September 14, 2012 15:15
-
-
Save damianh/3722548 to your computer and use it in GitHub Desktop.
Nancy on Microsoft.HttpListener.Owin
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using Microsoft.HttpListener.Owin; | |
| using Nancy.Hosting.Owin; | |
| namespace Spike | |
| { | |
| internal class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| var properties = new Dictionary<string, object> | |
| { | |
| {"scheme", "http"}, | |
| {"host", "*"}, | |
| {"port", "8081"}, | |
| {"path", "/hello"}, | |
| }; | |
| IDisposable server = ServerFactory.Create(new NancyOwinHost().ProcessRequest, properties); | |
| // etc | |
| server.Dispose(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment