React to hosting

This commit is contained in:
Hao Kung 2015-03-30 18:30:28 -07:00
parent 2aaeedc48a
commit b06d0855f0
1 changed files with 3 additions and 8 deletions

View File

@ -17,14 +17,9 @@ namespace MusicStore
var config = new Configuration();
config.AddCommandLine(args);
var context = new HostingContext()
{
Configuration = config,
ServerFactoryLocation = "Microsoft.AspNet.Server.WebListener",
ApplicationName = "MusicStore"
};
using (new HostingEngine().Start(context))
using (WebHost.CreateEngine(config)
.UseServer("Microsoft.AspNet.Server.WebListener")
.Start())
{
Console.WriteLine("Started the server..");
Console.WriteLine("Press any key to stop the server");