Skip to content

Commit

Permalink
Use test-directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Jan 15, 2024
1 parent db314d3 commit abdd1ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion NWebDav.Sample.Kestrel/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Builder;
using NWebDav.Server;

var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddNWebDav()
.AddDiskStore();
.AddDiskStore(opts =>
{
var nwebDavDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "NWebDAV");
Directory.CreateDirectory(nwebDavDir);
opts.BaseDirectory = nwebDavDir;
});
var app = builder.Build();
app.UseNWebDav();
app.Run();

0 comments on commit abdd1ab

Please sign in to comment.