Microservices with Node JS and React | Udemy

PHOTO EMBED

Mon Sep 25 2023 10:01:36 GMT+0000 (Coordinated Universal Time)

Saved by @jalalrafiyev

app.listen(4002, async () => {
  console.log("Listening on 4002");
  try {
    const res = await axios.get("http://localhost:4005/events");
 
    for (let event of res.data) {
      console.log("Processing event:", event.type);
 
      handleEvent(event.type, event.data);
    }
  } catch (error) {
    console.log(error.message);
  }
});
content_copyCOPY

https://www.udemy.com/course/microservices-with-node-js-and-react/learn/lecture/19099134