added winston logging, and shifted from got to axios

This commit is contained in:
2022-07-19 20:22:54 +05:30
parent 34fa0f6f30
commit 913e0555fc
8 changed files with 547 additions and 105 deletions

View File

@@ -1,4 +1,5 @@
require('dotenv').config();
const { logger } = require("../utils/logger");
const typedefs = require("../typedefs");
@@ -10,7 +11,7 @@ const __controller_func = async (req, res) => {
try {
} catch (error) {
console.error(error);
logger.error(error);
return res.status(500).send({ message: "Server Error. Try again." });
}
}