in Technology by
What are the uses of EventEmitter in Node.js?

1 Answer

0 votes
by

Every object in Node.js capable of emitting events is a member of the EventEmitter class. The http module is one such example.

All EventEmitter classes can use the eventEmitter.on() function to attach event listeners to the event. Then, as soon as such an event is caught, its listeners are called one by one synchronously.

Related questions

0 votes
0 votes
    What are the differences between Node.js and Javascript?...
asked Jan 25, 2021 in Technology by JackTerrance
0 votes
    Can anyone tell me what are some beginner Node Js project ideas? Select the correct answer from above options...
asked Jan 17, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me what are some awesome Node.js project examples? Select the correct answer from above options...
asked Jan 17, 2022 in Education by JackTerrance
0 votes
    What is REPL in Node.js?...
asked Jan 25, 2021 in Technology by JackTerrance
0 votes
    What is the reactor design pattern used in Node.js?...
asked Jan 25, 2021 in Technology by JackTerrance
0 votes
    How can we handle uncaught exceptions in Node.js?...
asked Jan 25, 2021 in Technology by JackTerrance
0 votes
    What is the difference between readFile and createReadStream functions in Node.js?...
asked Jan 25, 2021 in Technology by JackTerrance
0 votes
0 votes
    how to parse query string in node.js lambda?...
asked Dec 10, 2020 in Technology by JackTerrance
0 votes
    so i'm reviewing and practicing making rest api with node mongoose and express. I'm having problem making ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    I'm trying to debug my nodejs app using node-inspector. But Google Chrome doesn't show the code. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 11, 2022 in Education by JackTerrance
0 votes
    I have been looking at using the ssh2 module for sftp shipping of logs. However the cloud service hosting ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    Quick Summary of my question: Does Gulp 3.6.0 dest() handle glob-base the same way as 4.0.0? ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
0 votes
    here is my code. var http=require("http"); var fs = require("fs"); var express = require(" ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 19, 2022 in Education by JackTerrance
...