Static site hosting via tangled

Update

Changed files
+2 -5
src
+1 -3
package.json
··· 6 "tangled-pages": "bin/tangled-pages.js" 7 }, 8 "scripts": { 9 - "start": "npm run dev:express", 10 - "dev": "npm run dev:express", 11 - "dev:express": "nodemon src/server.js", 12 "dev:worker": "wrangler dev --port 3000" 13 }, 14 "dependencies": {
··· 6 "tangled-pages": "bin/tangled-pages.js" 7 }, 8 "scripts": { 9 + "start": "npx tangled-pages --config config.example.json", 10 "dev:worker": "wrangler dev --port 3000" 11 }, 12 "dependencies": {
+1 -2
src/worker.js
··· 3 4 async function handleSiteRequest(request, site) { 5 const url = new URL(request.url); 6 - const host = url.host; 7 const route = url.pathname; 8 const pagesService = new PagesService({ 9 domain: site.knotDomain, ··· 35 } 36 } 37 // Multi site mode 38 - const matchingSite = config.sites.find( 39 (site) => site.subdomain === subdomain 40 ); 41 if (matchingSite) {
··· 3 4 async function handleSiteRequest(request, site) { 5 const url = new URL(request.url); 6 const route = url.pathname; 7 const pagesService = new PagesService({ 8 domain: site.knotDomain, ··· 34 } 35 } 36 // Multi site mode 37 + const matchingSite = config.sites?.find( 38 (site) => site.subdomain === subdomain 39 ); 40 if (matchingSite) {