I've started using Echo[1] and it seems to provide most of what I'm looking for (routing, context, sessions, CSRF protection, form/json binding, etc). For templating, I'm using QuickTemplate[2] which creates statically generated templates, but Pongo2[3] and Jet[4] also look reasonable. sqlx[5], gorm[6], and sqlboiler[7] all seem reasonable for database access, depending on what your style is (sqlx being oriented towa…
Ask HN: What is your Golang web-dev tech stack?
11–20 of 47 posts
Re: Ask HN: What is your Golang web-dev tech stack?
#12My stack is basically:
- Postgres, using pq and sqlx
- A codegen ORM I wrote that scrapes schemas and generates CRUD and lookup functions for all my database types. I don't think dynamic ORMs like gorm are the way to go for Go.
- A session library I wrote a year ago, and simple Go wrapper handlers to require sessions, enforce authentication, &c, passing things like "current user" and "current session" down to standard net/http Handlers through Context.
- 10-or-so JSON utility functions I take with me from project to project.
- React, via create-react-app, so I all my templating is done in JSX.
- net/http/httptest for testing.
Re: Ask HN: What is your Golang web-dev tech stack?
#13I've started using Echo[1] and it seems to provide most of what I'm looking for (routing, context, sessions, CSRF protection, form/json binding, etc). For templating, I'm using QuickTemplate[2] which creates statically generated templates, but Pongo2[3] and Jet[4] also look reasonable. sqlx[5], gorm[6], and sqlboiler[7] all seem reasonable for database access, depending on what your style is (sqlx being oriented towa…
Re: Ask HN: What is your Golang web-dev tech stack?
#14Piecing together libraries can absolutely be daunting, but once you get a starter app built your productivity will go way, way up.
I'd really recommend this (paid) course at https://www.usegolang.com
It walks you through pulling in different libraries (Gorilla Mux, GORM, etc), gluing them together, and structuring your code in a maintainable way.
A couple of other folks have mentioned Buffalo. It's a great ecosystem for building applications quickly, but I would strongly urge you to go through gluing the packages together yourself first to really understand what is going on underneath the magic.
Re: Ask HN: What is your Golang web-dev tech stack?
#15Re: Ask HN: What is your Golang web-dev tech stack?
#16I've started using Echo[1] and it seems to provide most of what I'm looking for (routing, context, sessions, CSRF protection, form/json binding, etc). For templating, I'm using QuickTemplate[2] which creates statically generated templates, but Pongo2[3] and Jet[4] also look reasonable. sqlx[5], gorm[6], and sqlboiler[7] all seem reasonable for database access, depending on what your style is (sqlx being oriented towa…
Sweet! Buffalo looks really interesting. I was playing with Sails the other day, which is a Rails-like framework for nodejs, I will try Buffalo and try to compare the experience. Would you recommend Buffalo for a JSON Web API mobile backend project or would it be an overkill?
Re: Ask HN: What is your Golang web-dev tech stack?
#17I've found myself enjoying rolling/being more explicit about what it is that I need, so I now build out small web APIs just using a combination of Gorilla Mux + net/http.
Re: Ask HN: What is your Golang web-dev tech stack?
#18Re: Ask HN: What is your Golang web-dev tech stack?
#19DB: - dynamodb/psql depending on features. aws-sdk or base go sql package. - redis for caching. go-redis package.
Stats/logging: - statsd/graphite/grafana - sirupsen/logrus for logging
I usually write a wrapper for packages that will automatically report stats + logging.
Re: Ask HN: What is your Golang web-dev tech stack?
#20Am also looking forward to trying the new GoLand IDE from the JetBrains team. Currently using Atom but would be interested in dedicated integrations with gcloud sdk.