How To Create Golang REST API: Project Layout Configuration [Part 2]

Written by danstenger | Published 2020/04/02
Tech Story Tags: golang | golang-api | rest-api | docker | docker-compose | programming | postgresql | hackernoon-top-story

TLDR The Go application is now running in docker, can respond to code changes and reload for instant feedback. For handling http requests I will add another dependency, http router (mux) This is a lightweight, high performance HTTP request router that is easy to use and has everything most API's will need. I define all my routes in go/go and call handlers by explicitly passing application configuration so that each handler has access to things like database, configuration with env vars and more. I keep my handlers separate from router and group them under sub folders.via the TL;DR App

no story

Written by danstenger | GO and functional programming enthusiast
Published by HackerNoon on 2020/04/02