Reputation: 33
I am using angular 5 as client side and spring boot as server side along with Mongo db. I have two separate contents but my confusion is how to integrate it into a one WAR or JAR file and deploy on tomcat 8 server.
Upvotes: 0
Views: 2908
Reputation: 440
I have found some answers on a blog stating the reasons why a Angular5 cannot be deployed easily on a Tomcat (which is similar to spring boot, because it embeds a tomcat).
Essentially you need to distill your code with
ng build --base-href=/angular/
The distilled code can be then deployed into a tomcat or jetty or can be copied into a static folder of a spring-boot application. Note the "base-href", this parameter is very important in order that your angular gui can run.
Source: Deploy angular app in tomcat
Upvotes: 2