React to hosting
This commit is contained in:
parent
2aaeedc48a
commit
b06d0855f0
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue