Skip to content

Commit

Permalink
- Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennenoel committed Mar 9, 2024
1 parent afc6fe3 commit 0a836e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/http/src/servers/file.http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 0a836e8

Please sign in to comment.