Update sample

This commit is contained in:
Chris R 2016-05-27 09:49:54 -07:00
parent dda9376a0c
commit ce8d23d3e5
2 changed files with 8 additions and 4 deletions

View File

@ -12,13 +12,15 @@
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"web": { "StaticFileSample": {
"commandName": "web", "commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5000/",
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
} }
} }

View File

@ -1,4 +1,5 @@
using System; using System;
using System.IO;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
@ -29,6 +30,7 @@ namespace StaticFilesSample
public static void Main(string[] args) public static void Main(string[] args)
{ {
var host = new WebHostBuilder() var host = new WebHostBuilder()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseKestrel() .UseKestrel()
.UseIISIntegration() .UseIISIntegration()
.UseStartup<Startup>() .UseStartup<Startup>()