React to hosting
This commit is contained in:
parent
19696895a2
commit
f3de094815
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNet.Hosting;
|
||||||
using Microsoft.AspNet.Hosting.Startup;
|
using Microsoft.AspNet.Hosting.Startup;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.Framework.ConfigurationModel;
|
using Microsoft.Framework.ConfigurationModel;
|
||||||
|
using Microsoft.Framework.Runtime.Infrastructure;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.WebSockets.Client.Test
|
namespace Microsoft.AspNet.WebSockets.Client.Test
|
||||||
{
|
{
|
||||||
|
|
@ -45,13 +46,11 @@ namespace Microsoft.AspNet.WebSockets.Client.Test
|
||||||
config.Add(new MemoryConfigurationSource());
|
config.Add(new MemoryConfigurationSource());
|
||||||
config.Set("server.urls", "http://localhost:54321");
|
config.Set("server.urls", "http://localhost:54321");
|
||||||
|
|
||||||
var context = new HostingContext()
|
var engine = WebHost.CreateEngine(config)
|
||||||
{
|
.UseServer("Kestrel")
|
||||||
Configuration = config,
|
.UseStartup(startup);
|
||||||
ServerFactoryLocation = "Kestrel",
|
|
||||||
StartupMethods = new StartupMethods(startup, configureServices: null)
|
return engine.Start();
|
||||||
};
|
|
||||||
return new HostingEngine().Start(context);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue