Add Docker Compose deployment

This commit is contained in:
2026-05-05 14:23:45 -04:00
parent 01e1c78bf7
commit 7b6676cdc9
6 changed files with 67 additions and 4 deletions

View File

@@ -22,6 +22,13 @@ const mimeTypes = {
const server = http.createServer((request, response) => {
const requestUrl = new URL(request.url, `http://${request.headers.host}`);
if (requestUrl.pathname === "/healthz") {
response.writeHead(200, { "Content-Type": "application/json; charset=utf-8" });
response.end(JSON.stringify({ ok: true }));
return;
}
const pathname = requestUrl.pathname === "/" ? "/index.html" : requestUrl.pathname;
const filePath = path.normalize(path.join(root, pathname));