Skip to content
Snippets Groups Projects
Commit a9fa47c4 authored by Alexander Harkness's avatar Alexander Harkness
Browse files

Add logging for static requests

parent c300e5b1
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,15 @@ peerserver.on("disconnect", (client) => {
})
app.use("/", peerserver)
app.use("/", express.static("public"))
app.use(
"/",
express.static("public", {
setHeaders: (_response, file_path) => {
// Log access
console.log(Date.now(), file_path, "accessed")
},
}),
)
server.listen(port, () => {
const host = server.address().address
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment