Skip to content

Instantly share code, notes, and snippets.

@miroslavradojevic
Created February 12, 2018 09:23
Show Gist options
  • Save miroslavradojevic/d68eac10a0c7b0d205513316bee99ac8 to your computer and use it in GitHub Desktop.
Save miroslavradojevic/d68eac10a0c7b0d205513316bee99ac8 to your computer and use it in GitHub Desktop.
Self Host application using OWIN
class Program
{
static void Main(string[] args)
{
string baseUrl = "http://localhost:9090"; // webserver running on port 9090
using (WebApp.Start<Startup>(baseUrl))
{
Console.WriteLine(baseUrl);
Process.Start(baseUrl); // open the page from the application
Console.WriteLine("Press Enter to quit.");
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment