Reputation: 100190
Say you are developing a web front-end called F and F is served by a backend server S, which is mostly a RESTful API, but can also serve HTML. For most dynamic language platforms, we would put that front-end code in the public directory, and the server would serve pages from that directory. However, what if you develop the front-end in a separate repo from the back-end code?
In other words, what is the best way to keep the source code for F in a separate git repo from server S? How do developers keep the web front-end for servers in separate projects for the back-end. Or perhaps this is not common for web servers?
My guess is that for outfits that choose to develop the front-end in a separate project, then they do this as a build-step - they copy the source code for the web front-end to a recognized directory for the backend server project S.
Hope this question makes sense.
From what I can tell, Polymer's Vulcanize what I am trying to refer to - it provides a build step which generates an HTML file in the right location - https://github.com/Polymer/vulcanize
Upvotes: 0
Views: 1146
Reputation: 40971
Your question looks like a very common use case for git submodules
or subtrees
Alternatively, if your frontend people never develop S
, and your backend people never develop F
, then you should be using package dependency managers like npm or composer. F
devs include S
as a dependency, and S
devs include F
as a dependency.
Upvotes: 1