Skip to content

Instantly share code, notes, and snippets.

@WizzApp
Created March 23, 2012 18:17
Show Gist options
  • Save WizzApp/2173428 to your computer and use it in GitHub Desktop.
Save WizzApp/2173428 to your computer and use it in GitHub Desktop.
Nancy with Kayak
using System;
using System.Net;
using Kayak;
namespace HelloWorld
{
public class KayakStarter : ISchedulerDelegate
{
public static void Start(int port, bool debug)
{
Gate.Hosts.Kayak.KayakGate.Start(
new KayakStarter(),
new IPEndPoint(IPAddress.Any, port),
Gate.Adapters.Nancy.NancyAdapter.App());
}
public void OnException(IScheduler scheduler, Exception e)
{
}
public void OnStop(IScheduler scheduler)
{
}
}
}
using System;
using System.Net;
using Kayak;
namespace HelloWorld
{
public class KayakStarter : ISchedulerDelegate
{
public static void Start(int port, bool debug)
{
Gate.Hosts.Kayak.KayakGate.Start(
new KayakStarter(),
new IPEndPoint(IPAddress.Any, port),
debug ? "HelloWorld.Startup.Debug" : "HelloWorld.Startup");
}
public void OnException(IScheduler scheduler, Exception e)
{
}
public void OnStop(IScheduler scheduler)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment