add optional disable logging
This commit is contained in:
parent
bdc8662966
commit
58f04732d4
1 changed files with 6 additions and 0 deletions
6
index.js
6
index.js
|
@ -5,6 +5,7 @@ const crypto = require('crypto');
|
||||||
|
|
||||||
|
|
||||||
const port = 8080;
|
const port = 8080;
|
||||||
|
const log_disabled = false;
|
||||||
|
|
||||||
var app = express();
|
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"));
|
app.use("/files", express.static("projects"));
|
||||||
|
|
||||||
function get_indexes(project_id) {
|
function get_indexes(project_id) {
|
||||||
|
|
Loading…
Reference in a new issue