feat(logger): added pino in and removed all console logs

This commit is contained in:
2025-12-22 12:46:40 -06:00
parent a8c5aad833
commit 878c3b3638
9 changed files with 520 additions and 28 deletions

View File

@@ -1,10 +1,12 @@
import express from "express";
import { createLogger } from "./src/logger/logger.controller.js";
import { connectProdSql } from "./src/prodSql/sqlConnection.controller.js";
import { setupRoutes } from "./src/routeHandler.route.js";
const port = Number(process.env.PORT);
export const baseUrl = "";
const startApp = async () => {
const log = createLogger({ module: "system", subModule: "main start" });
const app = express();
// start the connection to the prod sql server
@@ -13,7 +15,7 @@ const startApp = async () => {
setupRoutes(baseUrl, app);
app.listen(port, () => {
console.log(`Listening on port ${port}`);
log.info(`Listening on port ${port}`);
});
};