Refactor logging implementation and enhance authentication logging
This commit is contained in:
@@ -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}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user