From 0a836e803efc0c3cd333659c2960ac5e20ef2cc9 Mon Sep 17 00:00:00 2001 From: Etienne Noel Date: Fri, 8 Mar 2024 20:46:21 -0800 Subject: [PATCH] - Update. --- packages/http/src/servers/file.http-server.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/http/src/servers/file.http-server.ts b/packages/http/src/servers/file.http-server.ts index 66a64f48..6ec7ff37 100644 --- a/packages/http/src/servers/file.http-server.ts +++ b/packages/http/src/servers/file.http-server.ts @@ -132,7 +132,9 @@ export class FileHttpServer { } // if is a directory search for index file matching the extension - if (fs.statSync(pathname).isDirectory()) pathname += 'index' + ext; + if (fs.statSync(pathname).isDirectory()) { + pathname += 'index.html'; + } // read file from file system fs.readFile(pathname, function(err, data){