TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

57 pointsby pyrhhoabout 14 years ago

3 comments

pyrhhoabout 14 years ago
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 未加载
ch0wnabout 14 years ago
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?
marketerabout 14 years ago
Looks awesome!