Last active
May 9, 2018 13:02
-
-
Save PradeepLoganathan/120ca76b764561c4129b5ff4fa5a7c61 to your computer and use it in GitHub Desktop.
OWIN Server and building them using WebHostBuilder.
This file contains 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
using System.IO; | |
using Microsoft.AspNetCore.Hosting; | |
namespace OWINHost | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var host = new WebHostBuilder() | |
.UseKestrel() | |
.UseContentRoot(Directory.GetCurrentDirectory()) | |
.UseStartup<Startup>() | |
.Build(); | |
host.Run(); | |
} | |
} | |
} |
This file contains 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
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Builder; | |
namespace OWINHost | |
{ | |
public class Startup | |
{ | |
public void Configure(IApplicationBuilder app) | |
{ | |
app.Run(async (context) => | |
{ | |
await context.Response.WriteAsync("<h1>Hello from the owin host</h1>"); | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment