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(); var config = new Configuration();
config.AddCommandLine(args); config.AddCommandLine(args);
var context = new HostingContext() using (WebHost.CreateEngine(config)
{ .UseServer("Microsoft.AspNet.Server.WebListener")
Configuration = config, .Start())
ServerFactoryLocation = "Microsoft.AspNet.Server.WebListener",
ApplicationName = "MusicStore"
};
using (new HostingEngine().Start(context))
{ {
Console.WriteLine("Started the server.."); Console.WriteLine("Started the server..");
Console.WriteLine("Press any key to stop the server"); Console.WriteLine("Press any key to stop the server");