OK so I\'ve been reading several of the other stack questions and trying to piece this together without much luck. Basically my approach is that I currently have one project wit
from your question i digged up only two questions
The solution i have chosen for that - since you already use api
to communicate client <-> server
- is to separate completely the two projects.
So what does it mean? for me is to have two different repositories. One for client, One for Server one this way you get few benefits:
But - How do they communicate while developing?
This is a good question:
One solution is to run two server on localhost in parallel, i.e mvn clean tomcat:run -P yourprofile; grunt server
But - I'll get cross domain if I try to access server-side from client-side from different port? You are right. And here you get the help of grunt and its plugin. grab a copy of grunt-connect-proxy
What is nice about this plugin that it acts as a middleware between grunt server and tomcat server so you ask grunt server for the API but actually grunt is asking tomcat server to answer on that (behind the scenes of course)
I guess this is a matter of personal preference question. I find the war file extremely big to do upload again and again (even if are able to share lib between all of your tomcat app). The solution I came up with is to do deploy over git.
OK, but I have one big war file. How can I do that?
For me I use a deploy script I wrote in bash. This is what it does:
Hope this will give you some directions,
Bests, Oak