feat(logger): added pino in and removed all console logs
This commit is contained in:
@@ -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}`);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user