I_Jemin

HTTP connection event

Showing 1 changed file with 9 additions and 6 deletions
const Logger = require('./logger');
const logger = new Logger();
const http = require('http');
logger.on('messageLogged', (arg) => {
console.log('Listener called',arg);
});
const server = http.createServer();
logger.log('message');
server.on('connection',(socket) => {
console.log('New Connection...');
} );
server.listen(3000);
console.log('Listening on port 3000....');
......