I want to host the Angular app and its backend in one host (I am not sure if this is a good idea!).
I created a web
folder in a NodeJS (express
) app and moved the angular deployed file there. Additionally, I made this folder static to make assets available to the public.
All the backend's APIs routes also start with /API/v1/*
When I open the home (index.html
), the angular' SPA works perfectly and I can navigate between routes easily, but when I try to open any frontend routes in a new tab, the express can not handle that request.
Any best practices that anyone can share for this scenario would be appreciated.