Yes, Tomas, you are right, but I have a front-end angular app with Angular material UI, I want to consume Payment API only for that purpose I need backend (Node.js). I thought to run the angular app on the express server on the same port.
that's why I followed this approach.
Do you have any other best solution/suggestion?
Another solution could be to use CORS middleware on the backend side and to just serve Angular app with nginx or some other fast http server. Both approaches have their pros and cons.
Yes, Tomas, you are right, but I have a front-end angular app with Angular material UI, I want to consume Payment API only for that purpose I need backend (Node.js). I thought to run the angular app on the express server on the same port.
that's why I followed this approach.
Do you have any other best solution/suggestion?
Another solution could be to use CORS middleware on the backend side and to just serve Angular app with nginx or some other fast http server. Both approaches have their pros and cons.
yes, sure thanks for your discussion and feedback :-)
@tomas Happy coding