<p>Hi, I'm looking for an golang framework to use for an Angular4 application I have to build. There are a couple out there (gin,beego,negroni,macaron,...) and I would like to hear about the experience of others.</p>
<hr/>**评论:**<br/><br/>robotparts: <pre><p>Seems like this is going to be downvoted. Here are some reasons why:</p>
<ul>
<li><p>Angular has nothing to do with the question. It will consume an API written in whatever language/framework you want.</p></li>
<li><p>There are many threads about web/api frameworks for Go already. Asking again is probably not going to provide any new insights.</p></li>
</ul></pre>shovelpost: <pre><blockquote>
<p>Hi, I'm looking for an golang framework to use</p>
</blockquote>
<p>Just because you need the Angular framework to write your frontend, that does not mean that you need a framework to write your Go backend.</p>
<p>Use the standard library. Write a few handlers that receive and return JSON. Keep it simple.</p></pre>LadyDascalie: <pre><p>I don't know much about the Angular side of things, but I know of this article: <a href="https://nathanleclaire.com/blog/2013/11/30/fear-and-loathing-with-golang-and-angular-js/" rel="nofollow">https://nathanleclaire.com/blog/2013/11/30/fear-and-loathing-with-golang-and-angular-js/</a></p>
<p>The author has put out some pretty good content overall, so I'd assume it's worth the read.</p></pre>superlinkx: <pre><p>The whole time I was reading that I was going "That's not form data, why would you treat it as form data"</p>
<p>Glad the author finally admitted it was their own mistake and detailed how it actually works, but that was kind of a weird way to write about the issue and has a pretty misleading title. </p></pre>SeerUD: <pre><p>You probably don't need a framework, I'd recommend looking at starting something with Go beforehand and seeing where you get to with a test project. There are lots of nice libraries to solve common problems like routing, etc.</p></pre>mrdiggu: <pre><p>Any http router would do. I use Chi on all of my personal and work related projects. Even the standard library can do what you need.</p>
<p>I don't know about Angular but I have a neat hobby project using Go as the backend and Ember as the frontend. Seems to work out fine as long as you don't expect things to just wire themselves up. It's gonna take at least a little effort.</p></pre>nilslice: <pre><p>Apologies if I'm missing the mark on your need.. but I use (and wrote) <a href="https://ponzu-cms.org" rel="nofollow">Ponzu</a> to do just this. Typically I work with React/Typescript on the front end which talks directly to the Ponzu server via HTTP using its built in JSON API. Ponzu has a useful CLI which you can use to generate most of the Go code you'd need to get the HTTP server, a CMS, the API and various useful middleware (GZIP, Auth, CORS, Caching, etc). I use Ponzu as a kind of blended Rails/Wordpress system that has no concept of the "front end" - just a JSON API. </p>
<p>There is also a "Go struct-to-JS" type generator tool written by another Go community memeber called <a href="https://github.com/natdm/typewriter" rel="nofollow">Typewriter</a> which might be useful and has a variety of JS flavors to pick from. </p>
<p>I haven't used Angular with Ponzu yet, so if you end up trying it, please let me know how it goes!</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传