kopia lustrzana https://github.com/badgen/badgen
Update preview
rodzic
aeadb70a85
commit
4a3ae666fb
|
@ -31,9 +31,15 @@ const serveIndex = serveMarked(md, {
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const serve404 = (req, res) => {
|
||||||
|
res.writeHead(404)
|
||||||
|
res.end()
|
||||||
|
}
|
||||||
|
|
||||||
http.createServer((req, res) => {
|
http.createServer((req, res) => {
|
||||||
switch (req.url) {
|
switch (req.url) {
|
||||||
case '/': return serveIndex(req, res)
|
case '/': return serveIndex(req, res)
|
||||||
|
case '/favicon.ico': return serve404(req, res)
|
||||||
default: return serveBadge(req, res)
|
default: return serveBadge(req, res)
|
||||||
}
|
}
|
||||||
}).listen(3000)
|
}).listen(3000)
|
||||||
|
|
Ładowanie…
Reference in New Issue