Best way for deploy angular.js application made with yeoman?

All we need is an easy explanation of the problem, so here it is.

I´m building application SPA using angular.js with yeoman which connect with a API RESTful made in Java using spring-MVC . i´m begginer for deploy web applications in angular and so i want to know some differents alternatives or best practice , for example deploy in http-server as apache, inside war using application-server as tomcat , or another option or suggestions .

Thanks a lot for help .

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Then your frontend code is production-ready, just run $ grunt build
and serve static resources produced by Yeoman (Grunt in fact) by the very same server that is responsible for providing the backend of your app.

take a look at my answer to similar question, showing project structure and some necessary configuration for Yeoman & Spring-MVC.

In some more advanced deployments scenarios, there might be a need for introducing load-balancing and you might need separate servers for the frontend and backend, but we are talking about basic config here.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply