Local preview only
The dynamic membership portal is unavailable in this static preview. Registration, sign-in, profiles, and billing require the deployed portal. This preview does not emulate authentication or accept payments.
import { createServer } from 'node:http'; import { realpath as portableRealpath } from 'node:fs'; import { readFile, stat } from 'node:fs/promises'; import { extname, isAbsolute, relative, resolve, sep } from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; import { promisify } from 'node:util'; // fs.promises.realpath uses the native API, which fails on some Windows SMB drives. // The portable implementation still resolves every symlink; never fall back to resolve(). const realpath = promisify(portableRealpath); const PUBLIC_ROOT = fileURLToPath(new URL('../htdocs/', import.meta.url)); const INCLUDES = new Map([ ['', 'common/header.html'], ['', 'common/topnav.html'], ['', 'common/footer.html'], ]); const MIME = new Map([ ['.html', 'text/html; charset=utf-8'], ['.htm', 'text/html; charset=utf-8'], ['.css', 'text/css; charset=utf-8'], ['.js', 'text/javascript; charset=utf-8'], ['.mjs', 'text/javascript; charset=utf-8'], ['.json', 'application/json; charset=utf-8'], ['.txt', 'text/plain; charset=utf-8'], ['.xml', 'application/xml; charset=utf-8'], ['.svg', 'image/svg+xml'], ['.ico', 'image/x-icon'], ['.png', 'image/png'], ['.jpg', 'image/jpeg'], ['.jpeg', 'image/jpeg'], ['.gif', 'image/gif'], ['.webp', 'image/webp'], ['.avif', 'image/avif'], ['.woff', 'font/woff'], ['.woff2', 'font/woff2'], ['.ttf', 'font/ttf'], ['.otf', 'font/otf'], ['.mp3', 'audio/mpeg'], ['.ogg', 'audio/ogg'], ['.wav', 'audio/wav'], ['.mp4', 'video/mp4'], ['.webm', 'video/webm'], ['.pdf', 'application/pdf'], ['.wasm', 'application/wasm'], ['.pub', 'text/plain; charset=utf-8'], ]); const PORTAL_NOTICE = `
The dynamic membership portal is unavailable in this static preview. Registration, sign-in, profiles, and billing require the deployed portal. This preview does not emulate authentication or accept payments.