diff --git a/mochify/lib/server.js b/mochify/lib/server.js index 962d279b..10c4ca5d 100644 --- a/mochify/lib/server.js +++ b/mochify/lib/server.js @@ -47,6 +47,13 @@ ${modules.map((mod) => ``).join('')} `); return; } + if (req.url === '/favicon.ico') { + res.writeHead(200, { + 'Content-Type': mime.getType('favicon.ico') + }); + res.end(); + return; + } const file = path.join(base_path, req.url.substring(1)); try { await fs_promises.stat(file);