summaryrefslogtreecommitdiff
path: root/DSACore/Startup.cs
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-09-26 19:18:41 +0200
committerTrueDoctor <d-kobert@web.de>2018-09-26 19:18:41 +0200
commit92e8bb7523c775014ccf68355e3f0178ebf4a61c (patch)
treec68840e084740c890fe85cf2e4a7356115a1b0be /DSACore/Startup.cs
parent0d8ae32d2f974ad6139a55e6e0d97d785fb13489 (diff)
implemented fudamental Web Api
Diffstat (limited to 'DSACore/Startup.cs')
-rw-r--r--DSACore/Startup.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs
new file mode 100644
index 0000000..2d0c2a3
--- /dev/null
+++ b/DSACore/Startup.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+
+namespace DSACore
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
+ {
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+ else
+ {
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+ app.UseMvc();
+ }
+ }
+}