From 4a3ae666fb7422bf01cf7e6410a487f7e0b769cc Mon Sep 17 00:00:00 2001 From: Amio Date: Wed, 11 Jul 2018 13:40:30 +0800 Subject: [PATCH] Update preview --- test/serve-preview.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/serve-preview.js b/test/serve-preview.js index b43ab67..28ee319 100644 --- a/test/serve-preview.js +++ b/test/serve-preview.js @@ -31,9 +31,15 @@ const serveIndex = serveMarked(md, { ` }) +const serve404 = (req, res) => { + res.writeHead(404) + res.end() +} + http.createServer((req, res) => { switch (req.url) { case '/': return serveIndex(req, res) + case '/favicon.ico': return serve404(req, res) default: return serveBadge(req, res) } }).listen(3000)