Skip to content

Instantly share code, notes, and snippets.

@thiagoloureiro
Last active November 26, 2017 12:44
Show Gist options
  • Save thiagoloureiro/013a69a54aea9826f7089fa42662423a to your computer and use it in GitHub Desktop.
Save thiagoloureiro/013a69a54aea9826f7089fa42662423a to your computer and use it in GitHub Desktop.
internal class Program
{
private static void Main(string[] args)
{
Cluster.Bootstrap(new NancyProvider(), new ConsulProvider(), "customers", "v1");
Console.ReadLine();
}
}
public class CustomerService : NancyModule
{
public CustomerService() : base("/customers")
{
Get["/"] = _ =>
{
var customer = new Customer
{
CustomerId = 123,
CustomerName = "Acme Inc",
};
return Response.AsJson(customer);
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment