DEV Community

Discussion on: How do you develop angular application with with different back-end technologies

Collapse
 
lysofdev profile image
Esteban Hernández

Deploying on the same domain is simple using sub-domains. An API Gateway can be configured to route each sub-domain (and even every request) to a different server or cluster. For example, serve the app directly on the default domain through a CDN like S3 and setup the "api." sub-domain as the service gateway which routes requests to a private network.

Collapse
 
reegodev profile image
Matteo Rigon

Yes indeed deploying to sub domains is the preferred method most of the times. When i said to avoid deploying them to the same domain i meant to avoid having a scenario where your app is served from the same web server that serves the api, like yourdomain.comfor the app and yourdomain.com/api for the api.

Thread Thread
 
lysofdev profile image
Esteban Hernández

Yea, agreed. This would make scaling a hassle.