Skip to content

Instantly share code, notes, and snippets.

@damianh
Created September 14, 2012 15:15
Show Gist options
  • Select an option

  • Save damianh/3722548 to your computer and use it in GitHub Desktop.

Select an option

Save damianh/3722548 to your computer and use it in GitHub Desktop.
Nancy on Microsoft.HttpListener.Owin
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