Make error reporting directory configurable

master
Sven Slootweg 7 years ago
parent af10fd8d63
commit 0c7bd699eb

@ -5,5 +5,8 @@
"listLimit": 100,
"pasteInterval": 1
}
},
"errors": {
"directory": "./errors"
}
}

@ -2,13 +2,14 @@
'use strict';
const errorReporter = require("./src/error-reporting");
const config = require("./config.json");
const path = require("path");
const errorReporter = require("./src/error-reporting")(path.join(__dirname, config.errors.directory));
const express = require("express");
const expressWs = require("express-ws");
const config = require("./config.json");
const clientStore = require("./src/client-store")();
const scraper = require("./src/scraper")({

@ -4,8 +4,7 @@ const path = require("path");
const reportErrors = require("report-errors");
const mkdirp = require("mkdirp");
let errorPath = path.join(__dirname, "../errors");
module.exports = function(errorPath) {
mkdirp.sync(errorPath);
module.exports = reportErrors(errorPath, {
@ -18,3 +17,4 @@ module.exports = reportErrors(errorPath, {
}
}
});
};

Loading…
Cancel
Save