5 ms·
I have been powering SPA with go backend, and found gorilla mux [0] to be quite reliable for years. - [0] https://github.com/gorilla/mux https://github.com/gor
by stockkid 8y ago
I have been powering SPA with go backend, and found gorilla mux [0] to be quite reliable for years.
- [0] https://github.com/gorilla/mux https://github.com/gorilla/mux
- throwaway77384 8y agoOr if you can live with slightly fewer features (and an additional param for your handlers): https://github.com/julienschmidt/httprouter https://github.com/julienschmidt/httprouter Appears to be faster, but I guess the difference wouldn't be noticeable until you start doing some pretty heavy stuff.
- sethammons 8y agoIt is also mostly unnoticeable then too. The slower parts of your service will crowd out httorouter most likely. I'm a bigger fan of stdlib compatible routers.
- InGodsName 8y agoI am coming from Rails. I want to use Postgres RDS, what do you use for migration? Or if you don't use anything then how migrations are managed in Go?
- sethammons 8y agoWe have an in-house schema migration utility. Due to the nature of our stack (mostly for historical/legacy reasons), we have multiple languages that can reach in and read different tables. We don't have code-generation ala RoR and a single service that we can update at the same time. We have many, many read slaves and a master DB that we update first in a backwards compatible manner, then update software to work with the new hotness. Disjointed by design. The migration tooling and its stack is orthogonal to our languages we use to write software.
- nobleach 8y agoIt seems no matter what stack I use these days (Kotlin/Java Spring-Boot, Node/Typescript) I end up using Flyway for the DB migrations.