summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-11-26 18:31:04 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-11-26 18:31:04 -0500
commit698c2702116507ec4b2409f5a9776518539f941e (patch)
tree5e3cdbcd0fc122dcee9fe9d669da7da9d1bc40bb /src/SMAPI.Web
parentf44df025cab4c2b70bf07c6d8407c8cc465b57cb (diff)
downloadSMAPI-698c2702116507ec4b2409f5a9776518539f941e.tar.gz
SMAPI-698c2702116507ec4b2409f5a9776518539f941e.tar.bz2
SMAPI-698c2702116507ec4b2409f5a9776518539f941e.zip
tweak log parser startup
Diffstat (limited to 'src/SMAPI.Web')
-rw-r--r--src/SMAPI.Web/Program.cs8
-rw-r--r--src/SMAPI.Web/Startup.cs6
2 files changed, 8 insertions, 6 deletions
diff --git a/src/SMAPI.Web/Program.cs b/src/SMAPI.Web/Program.cs
index eeecb791..5856fc98 100644
--- a/src/SMAPI.Web/Program.cs
+++ b/src/SMAPI.Web/Program.cs
@@ -1,4 +1,4 @@
-using System.IO;
+using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
namespace StardewModdingAPI.Web
@@ -14,10 +14,8 @@ namespace StardewModdingAPI.Web
public static void Main(string[] args)
{
// configure web server
- new WebHostBuilder()
- .UseKestrel()
- .UseContentRoot(Directory.GetCurrentDirectory())
- .UseIISIntegration()
+ WebHost
+ .CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build()
.Run();
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index 0ea9f7ee..799fb0f8 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -33,7 +33,7 @@ namespace StardewModdingAPI.Web
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
- .Add(new BeanstalkEnvPropsConfigProvider()) //.AddEnvironmentVariables()
+ .Add(new BeanstalkEnvPropsConfigProvider())
.Build();
}
@@ -63,6 +63,10 @@ namespace StardewModdingAPI.Web
{
loggerFactory.AddConsole(this.Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
+
+ if (env.IsDevelopment())
+ app.UseDeveloperExceptionPage();
+
app
.UseCors(policy => policy
.AllowAnyHeader()