diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-21 15:26:05 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-21 15:26:05 +0000 |
commit | a8fb74b2c9fa202f344e024f40d5308270fabc45 (patch) | |
tree | b37ccb9c55b47f865fab2f37f196df0b1d4b6a51 /Main/Startup.cs | |
parent | 8a449fe46f6d40c76faab4ea1084de13bf05ba69 (diff) | |
download | newsaggregator-a8fb74b2c9fa202f344e024f40d5308270fabc45.tar.gz newsaggregator-a8fb74b2c9fa202f344e024f40d5308270fabc45.tar.bz2 newsaggregator-a8fb74b2c9fa202f344e024f40d5308270fabc45.zip |
Website doesn't display index.html for some reason??
Diffstat (limited to 'Main/Startup.cs')
-rw-r--r-- | Main/Startup.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Main/Startup.cs b/Main/Startup.cs index 6e26943..2722747 100644 --- a/Main/Startup.cs +++ b/Main/Startup.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.EntityFrameworkCore;
@@ -47,12 +48,13 @@ namespace Server { }
app.UseDefaultFiles();
- app.UseStaticFiles(
- Path.Combine(
+ string website_path = Path.Combine(
Directory.GetParent(Directory.GetCurrentDirectory()).ToString(),
- "Website"
- )
- );
+ "Website");
+ app.UseStaticFiles(new StaticFileOptions {
+ FileProvider = new PhysicalFileProvider(website_path),
+ RequestPath = "/test"
+ });
app.UseHangfireDashboard();
app.UseHangfireServer();
|