Advertisement
Guest User

Untitled

a guest
Jul 1st, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System.Net;
  2. using Example.Owin;
  3. using Nancy;
  4.  
  5. namespace Example
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. // Create a new Nancy instance
  12. var nancy = new Nancy.Hosting.Owin.NancyOwinHost();
  13.  
  14. // Create a new OwinServer (based on Kayak)
  15. var server = new OwinServer(nancy.ProcessRequest);
  16.  
  17. // Start the OwinServer
  18. server.Start(System.Net.IPAddress.Any, 8080);
  19. }
  20. }
  21.  
  22. public class MainModule : NancyModule
  23. {
  24. public MainModule()
  25. {
  26. Get["/"] = _ => "Hello, World!";
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement