<p>Within the build of a web application based on Golang, I try to find a balance between how to expose my files and folders.
The project should contain tree directories: app, backend, api.
app is the directory that hosts all frontend staff.
May I create a single for the whole project, may I separate them.
I think that you full stack developer you could help me and share with me a complete tree to most of web applications. </p>
<hr/>**评论:**<br/><br/>shovelpost: <pre><p>Lately I've been separating my Single Page web apps into two repositories. One that has pure Go API code and the other that has pure HTML/JavaScript/CSS frontend code. It has been working well for me. </p></pre>RevMen: <pre><p>This is what I do, too. I think there are good reasons to keep them separate.</p>
<p>The front and the back really are separate applications that communicate. It's possible to write/test/deploy them from completely separate machines/environments.</p>
<p>It's possible to write different front ends that communicate with the same back end. Putting all of those different front ends into the same repo would be messy.</p>
<p>The front and back ends can be deployed to different machines.</p></pre>kiwibokbok: <pre><p>I like this approach, we have been using it with some non-golang backed projects and it's allowing great separation and testing. </p></pre>jackmcmorrow: <pre><p>I think your dir structure is ok, but I'm that guy that has backend and frontend in the same folder (which I probably shouldn't do, especially for security purposes</p></pre>adamkw94: <pre><p>Maybe do app, model (API), controller </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传