Static site hosting via tangled
1export class Config {
2 constructor({ site, sites, subdomainOffset, cache = false }) {
3 this.site = site;
4 this.sites = sites;
5 this.subdomainOffset = subdomainOffset;
6 this.cache = cache;
7 }
8
9 static async fromFile(filepath) {
10 const fs = await import("fs");
11 const config = JSON.parse(fs.readFileSync(filepath, "utf8"));
12 return new Config(config);
13 }
14}