chore: remove micro, use http.createServer

and change debug logging to info
This commit is contained in:
2019-09-27 12:17:49 -07:00
parent eb35ae5dfd
commit d685a0fc97
4 changed files with 5 additions and 81 deletions

View File

@@ -14,7 +14,7 @@ module.exports = async function server(req, res) {
let filename;
const { url, format } = req.queryParams;
logger.debug(`Request: ${req.url}`);
logger.info(`Request: ${req.url}`);
if (!url) {
sendError(res, 400);
@@ -69,7 +69,7 @@ module.exports = async function server(req, res) {
}
const dlFilepath = path.join(__dirname, '../data', filename);
logger.debug(`Downloaded file is ${dlFilepath}`);
logger.info(`Downloaded file is ${dlFilepath}`);
if (!sent) {
fs.readFile(dlFilepath, (err, fileBuffer) => {