apache - Webserver for Angular and Spring application -


i'm building small web application personal project. angular web application talk spring-boot service layer in turn read/write stuff mongodb.

i hope host on single ec2 instance in aws. question how configure web server (like apache doesn't have be) 'beautify' urls bit. example, without touching angular run @ host:4200 , service layer @ host:8080. have map proper domain host in aws, hiding of ports etc gets murky me.

i want able hit web app @ domain.com (no ports etc) , want service layer ideally have similar setup e.g. domain.com/service (no ports etc).

how configure webservice me? examples or pointers specific examples ideal, pointer right documentation helpful.

this thread kind of similar want not helpful: how deploy spring framework backend , angular 2 frontend application in online server?

you can use setup aws cloudfront reverse proxy , cdn cache. can map domain name , ssl certificates(you can use aws issued free ssl certificates through aws certificate manager) cloudfront while ec2 instance plugged origin behind cloudfront shown in following diagram.

enter image description here

in diagram have optionally added, common practice in designing applications in aws.

  • hosting angular app in s3
  • using autoscaling & loadbalancing ec2 instances.

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -