summaryrefslogtreecommitdiff
path: root/Dewdrop/Startup.cs
diff options
context:
space:
mode:
authorJames Stine <leon.blade@gmail.com>2017-08-13 17:44:00 -0400
committerJames Stine <leon.blade@gmail.com>2017-08-13 17:44:00 -0400
commit06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49 (patch)
treefea1bb6a927ca84009657430134cea8a2028cc09 /Dewdrop/Startup.cs
downloadSMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.tar.gz
SMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.tar.bz2
SMAPI-06ed54b2c6c2e1f49d6975a34ea36f685d7f7c49.zip
First commit.
Diffstat (limited to 'Dewdrop/Startup.cs')
-rw-r--r--Dewdrop/Startup.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/Dewdrop/Startup.cs b/Dewdrop/Startup.cs
new file mode 100644
index 00000000..00c18bab
--- /dev/null
+++ b/Dewdrop/Startup.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+namespace Dewdrop
+{
+ public class Startup
+ {
+ public Startup(IHostingEnvironment env)
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(env.ContentRootPath)
+ .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
+ .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
+ .AddEnvironmentVariables();
+ Configuration = builder.Build();
+ }
+
+ public IConfigurationRoot Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ // Add framework services.
+ services.AddMvc();
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ {
+ loggerFactory.AddConsole(Configuration.GetSection("Logging"));
+ loggerFactory.AddDebug();
+
+ app.UseMvc();
+ }
+ }
+}