Static site hosting via tangled

Worker config

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