From 58f04732d4e4818a066eae1014386677af6ca9bc Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Sun, 6 Jun 2021 01:11:35 -0400 Subject: [PATCH] add optional disable logging --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index d47fef7..c34d5dd 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,7 @@ const crypto = require('crypto'); const port = 8080; +const log_disabled = false; var app = express(); @@ -12,6 +13,11 @@ const cache = { }; +if (log_disabled) { + console.prototype._log = console.log; + console.prototype.log = function (...args) { } +} + app.use("/files", express.static("projects")); function get_indexes(project_id) {