The question is published on by Tutorial Guruji team.
So I want to create a web-app with NodeJS which accesses three different APIs:
- My Own RESTful-API connected to a database
- Third party API #1
- Third party API #2
Should I really implement access to all three APIs in my web-app or should I expand my own API to work as an interface to the other two APIs?
I know this question may be very subjective but I didn’t find anything about this situation on the web. I hope someone can give me some information how to deal with this situation.
Answer
An api gatweway sound like a good solution for you.
In general – Your client app will communicate only with the gateway, and the gateway it self will redirect the request into your relevant web app.
I recommend you to read this article about API Gateways: https://blog.risingstack.com/building-an-api-gateway-using-nodejs/