title: How to deploy AngularJS app and Spring Restful API service on the same domain/server?
body: <p>I'm new to Spring and AngularJS. I followed the steps <a href="http://spring.io/guides/gs/rest-service/" rel="noreferrer">here</a> to build the back end restful API, and it sends Json upon requests. So, according to the guide, When I run "mvn spring-boot:run" the tomcat server starts at localhost:8080.</p>
  
  <p>Then I used Yeoman angular generator to build my angular app. And when I run "grunt serve" inside my angular app, the front end app runs at localhost:9000.</p>
  
  <p>What should I do so that my angular app can be served together with my Springboot tomcat server on the same domain, say, localhost:8080 ?</p>
  
  <p>Is there a sample project that I can follow? I found the following projects, but still cannot make it work as I don't have much background on tomcat.</p>
  
  <ol>
  <li><a href="https://github.com/robharrop/spring-angularjs" rel="noreferrer">https://github.com/robharrop/spring-angularjs</a></li>
  <li><a href="https://github.com/GermanoGiudici/angularjs-maven-tomcat-seed" rel="noreferrer">https://github.com/GermanoGiudici/angularjs-maven-tomcat-seed</a></li>
  <li><a href="https://github.com/xvitcoder/spring-mvc-angularjs" rel="noreferrer">https://github.com/xvitcoder/spring-mvc-angularjs</a></li>
  </ol>