tesses-backup/TessesDedupServer/Program.cs

15 lines
514 B
C#
Raw Permalink Normal View History

2024-07-23 03:49:40 +00:00
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);