create empty file

This commit is contained in:
Ryan Peters 2022-11-30 21:43:22 -05:00
parent 5b3b6711d9
commit 0489eb4b7e
2 changed files with 9 additions and 38 deletions

View File

@ -13,6 +13,15 @@ if (!app.Environment.IsDevelopment())
app.UseHsts(); app.UseHsts();
} }
// create file
var configuration = app.Services.GetService<IConfiguration>();
var filePath = configuration["ContentFilePath"];
if (!File.Exists(filePath))
{
File.WriteAllText(filePath, string.Empty);
}
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseStaticFiles(); app.UseStaticFiles();

View File

@ -1,38 +0,0 @@
this is a testasdas
thas
sdfsdfs
asdas
asdasda
- asdas
- asdassasdas
asd
as
das
as
assa
as
dasd
asd
asd
asdassdfdsf
dsfsd
das
das
dasd
asda
a