Add Docker Compose deployment
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user