+ 2

listen on node js

hi guys . i have a Q about node js http module and also some server related modules like express & ... my Q is why we use listen for a port? eventEmitter doesnt make sense for me . can you please give me a good resource for that ? another question : if i want to get a object in json format from a url , what should i do in express ? for example there is an API called mymemory translation which is free . i want to get the json format and log a property of it . what should i do ? can you explain for me ? thanks all :)

31st Oct 2020, 9:28 AM
MohammadErfan Gooneh
3 odpowiedzi
+ 4
https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp This playlist is really good, video #8 is about eventEmitters.
31st Oct 2020, 11:17 AM
maf
maf - avatar
31st Oct 2020, 9:43 AM
Gordon
Gordon - avatar
+ 2
Server script is different from desktop application, it always listen to the request of clients, and only execute codes and response data, once receive a request.
31st Oct 2020, 2:06 PM
Calviղ
Calviղ - avatar