Merge branch 'release' into dev

This commit is contained in:
BrennanConroy 2016-04-28 10:00:47 -07:00
commit bfdf30ca03
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Net.Http.Server; using Microsoft.Net.Http.Server;
namespace MusicStore.Standalone namespace MusicStore.Standalone
@ -7,11 +8,16 @@ namespace MusicStore.Standalone
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var builder = new WebHostBuilder() var builder = new WebHostBuilder()
// We set the server by name before default args so that command line arguments can override it. // We set the server by name before default args so that command line arguments can override it.
// This is used to allow deployers to choose the server for testing. // This is used to allow deployers to choose the server for testing.
.UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseServer("Microsoft.AspNetCore.Server.Kestrel")
.UseDefaultHostingConfiguration(args) .UseConfiguration(config)
.UseIISIntegration() .UseIISIntegration()
.UseStartup("MusicStore.Standalone"); .UseStartup("MusicStore.Standalone");

View File

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Net.Http.Server; using Microsoft.Net.Http.Server;
namespace MusicStore namespace MusicStore
@ -7,8 +8,13 @@ namespace MusicStore
{ {
public static void Main(string[] args) public static void Main(string[] args)
{ {
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();
var builder = new WebHostBuilder() var builder = new WebHostBuilder()
.UseDefaultHostingConfiguration(args) .UseConfiguration(config)
.UseIISIntegration() .UseIISIntegration()
.UseStartup("MusicStore"); .UseStartup("MusicStore");