Static site hosting via tangled

Worker config

Changed files
+14 -1
src
+13
config.worker.example.json
··· 1 + { 2 + "sites": [ 3 + { 4 + "subdomain": "example", 5 + "ownerDid": "did:plc:p572wxnsuoogcrhlfrlizlrb", 6 + "repoName": "tangled-pages-example", 7 + "branch": "main", 8 + "baseDir": "/public", 9 + "notFoundFilepath": "/404.html" 10 + } 11 + ], 12 + "subdomainOffset": 2 13 + }
+1 -1
src/worker.js
··· 1 1 import { Handler } from "./handler.js"; 2 2 import { Config } from "./config.js"; 3 - import configObj from "../config.example.json"; // must be set at build time 3 + import configObj from "../config.worker.example.json"; // must be set at build time 4 4 5 5 export default { 6 6 async fetch(request, env, ctx) {