TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Livecomments.go - Tutorial in Go, backbone.js, socket.io, and redis

57 点作者 pyrhho大约 14 年前

3 条评论

pyrhho大约 14 年前
I started this as a project to learn Go, Backbone.js, Socket.io, and Redis. And thought that I may as well turn it into a tutorial in the hopes it helps other people learn too.<p>It's a live commenting system. Designed to be a cross between a chat-room and blog comments. It's pretty far from being done, but I felt that adding too many more features would make it a bit complex for a basic tutorial.<p>After I posted it I learned that actually, ending lines in Go with a semi-colon is discouraged, so, hind-sight is 20/20, and I may change that later to be more correct.<p>Hopefully people find it useful, and learn a bit.<p>Edit: Should mention, it's fairly basic, so there's no spam protection, or editing, or threads, yet... Eventually I'd like to include it on the page with my blog posts, but it's not quite ready for prime-time yet.
评论 #2436664 未加载
评论 #2436776 未加载
评论 #2437047 未加载
ch0wn大约 14 年前
Could someone explain that to me?<p><pre><code> http.Handle("/", http.FileServer("static/", "/")) if err := http.ListenAndServe(":3000", nil); ... </code></pre> Does the http module keep track of the routes within the module state? This seems like a horrible idea coming from python. How does this work in Go? Is it possible to run two HTTP servers in parallel using threads with this model?
marketer大约 14 年前
Looks awesome!