News for hackers. Stuff that matters.
Re:Ask HN: Which web stack should I learn for personal proje... by endisukaj on Wednesday November 30, 2016 @01:47PM (#13073467)
How easy is it to build a full web app with Golang (I'm talking backend + views here)? I have used Go for some small projects where I only built a REST API using Go's default http library but never for something bigger.
Re:Ask HN: Which web stack should I learn for personal proje... by Bjorkbat on Wednesday November 30, 2016 @06:57PM (#13075817)
Not bad at all honestly. Golang comes with a built-in templating engine that was easy enough to convince me not to look for a better one. Routing is simple, especially if you're using the Gorilla toolkit's mux package. Figuring out how to work with database calls were tricky when I first started out because I was used to Django abstracting that part away from me, but eventually I really got the hang of it.

I would argue that the tricky part is session's and middleware. When I first attempted to build a golang web app that required session cookies I got so discouraged that I just swore them off and went with JSON web tokens instead. It also took me a while to wrap my head around the concept of clean middleware.

I would say it was rewarding in the end though, because I learned about some low-level concepts typically abstracted away by the framework I was working with. It's fun to know about these things.

Re:Ask HN: Which web stack should I learn for personal proje... by ddmf on Thursday December 01, 2016 @03:45AM (#13078101)
I've been writing our in house extranet with it, and the built in templating is very easy once you get the hang of it. The context addition makes it very easy to authenticate and pass that through to the endpoints.

The https stuff is done via Caddy server that automatically serves and updates the cert via LetsEncrypt - requests are then forwarded to the go app.