How to combine Angular-Cli frontend to Spring-boot backend

Seeker :

I currently have a web application that runs an Angular 2 frontend, and a Spring Boot backend.

I have followed this tutorial in order to integrate the two components.

http://blog.jdriven.com/2016/12/angular2-spring-boot-getting-started/

My application now has the same structure as this

https://github.com/jbruinink/ng2boot

The frontend and backend can now be built with a single command. However the frontend and backend generate seperate jars, and need to be started seperately.

Is there a way to package my appliacation in a single jar that starts both the frontend and the backend?

Jeroen :

That question was actually asked and answered in the comment section:

"The frontend is actually packaged into the backend jar. You can simply start the backend and go to http://localhost:8080. The development server at port 4200 is optional. It just makes it easier to develop the frontend, because all changes are reloaded automatically."

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=457347&siteId=1