October 17, 2020

Accessing your database from inside an HTTP handler in Go

Note: While this is interesting to learn more about creating closures, it was pointed out to me that there is a better way to do this. Look at this next post to learn more about it. Writing my last project backend in Go, I was confronted with how to actually write my HTTP handlers. The main issue I encountered was how to get the database handle in the handler so that I could actually use it for incoming requests. Read more

Copyright Marin Gilles 2019-2022