Last active
November 26, 2017 12:44
-
-
Save thiagoloureiro/013a69a54aea9826f7089fa42662423a to your computer and use it in GitHub Desktop.
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
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