Live data from Hacker News

Ask HN: What Go framework for web API are you using in production?

news.ycombinator.com

21–30 of 65 posts

Re: Ask HN: What Go framework for web API are you using in production?

#22

Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.

Yes, this. One of the things I love about go is the stdlib capabilities. I try to avoid a lot of frameworks as there seems to be too much "magic" going on that you end up having to figure out when it comes time to troubleshoot. The HttpRouter is bare bones enough to understand and build on top of while still adding some value and helping avoid creating boilerplate code on your own.

Re: Ask HN: What Go framework for web API are you using in production?

#27
post #18

Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.

How do you handle database schema migrations?

The best generic tool/library for migrations that I've found is https://github.com/remind101/migrate

We're using it in production on a few CoreOS projects.

Re: Ask HN: What Go framework for web API are you using in production?

#28
We've been pretty happy with https://gobuffalo.io so far. We're serving up a Vue.js app with it. We needed a single binary to deploy on a client's server with no external dependencies and buffalo fits the bill. It comes with a cli that runs webpack and does hot reloads on save. It also has a build command that will bundle all the assets up to shove in the binary.

Re: Ask HN: What Go framework for web API are you using in production?

#30
post #18

Using no frameworks at all, only https://github.com/julienschmidt/httprouter for routing.

How do you handle database schema migrations?

Migrations are a minor pain point for me. The libraries I've used don't support running (all) pending migrations; only those with a timestamp more recent than the previous one. This means we have to finesse the timestamps manually as migrations get merged into the main branch and deployed to various environments. As such, the value offered by the migration library is pretty minimal compared to just remembering to pipe a .sql file directly into the database. Hopefully there's a more robust option out there that I just haven't found yet.
Post reply on HN