tesses-backup/TessesDedupServer/Program.cs

15 lines
514 B
C#

using TessesDedup;
using Tesses.WebServer;
using Tesses.VirtualFilesystem.Filesystems;
using Tesses.VirtualFilesystem;
using LiteDB;
Directory.CreateDirectory("data/storage");
Directory.CreateDirectory("data/wwwroot");
LocalFileSystem fs = new LocalFileSystem();
Dedup dedup = new Dedup(new StaticServer("data/wwwroot"){ RedirectToRootInsteadOfNotFound=true},fs.GetSubdirFilesystem(Special.CurDir / "data" / "storage"),()=>new LiteDatabase("data/backups.db"));
dedup.Server.StartServer(3255);