Professional Documents
Culture Documents
Module 06A Event Driven Programming - Event Driven Architecture (1)
Module 06A Event Driven Programming - Event Driven Architecture (1)
Module 06A Event Driven Programming - Event Driven Architecture (1)
programming
BITS Pilani
Pilani Campus
BITS Pilani
Pilani Campus
Event-driven programming
code is executed upon activation of events.
method 1
method 2 Do
Do method 3 method 2
then
method 1
then
-------- method 1
method 3 -------- then
method 3
method n
• This code defines an HTTP server that listens on port 3000 and responds with
the request method and URL of any incoming request. This is the basic
implementation of the echo protocol, which simply reflects back the information
received from the client.
• To run this code, save it as a file named echo_server.js and then run the
following command in your terminal: node echo_server.js
Thank You