+ 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 :)
3 Respostas
+ 4
https://www.youtube.com/playlist?list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp
This playlist is really good, video #8 is about eventEmitters.
+ 3
fetch()
https://youtu.be/is0QYV0oHx0
+ 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.