Refactor logging implementation and enhance authentication logging

This commit is contained in:
2025-01-30 22:02:35 +01:00
parent 2ebf92a5d5
commit 23a6d9b10f
5 changed files with 38 additions and 27 deletions

View File

@@ -8,6 +8,7 @@ const debug = require('debug')('app');
const tasksRouter = require('./routes/tasks');
const authRouter = require('./routes/auth');
const authMiddleware = require('./middleware/auth');
const logger = require('./logger');
const app = express();
const port = 3044;
@@ -37,5 +38,6 @@ app.use('/', authRouter);
app.use('/', authMiddleware, tasksRouter);
app.listen(port, () => {
debug(`Server running at http://localhost:${port}`);
logger.info(`Server running at http://localhost:${port}`);
//debug(`Server running at http://localhost:${port}`);
});