Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Net;
- using Example.Owin;
- using Nancy;
- namespace Example
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Create a new Nancy instance
- var nancy = new Nancy.Hosting.Owin.NancyOwinHost();
- // Create a new OwinServer (based on Kayak)
- var server = new OwinServer(nancy.ProcessRequest);
- // Start the OwinServer
- server.Start(System.Net.IPAddress.Any, 8080);
- }
- }
- public class MainModule : NancyModule
- {
- public MainModule()
- {
- Get["/"] = _ => "Hello, World!";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement