A frontend/UI is a very important feature of an application accessible by users. In this post we will show a simple frontend and evolve our service and setup to incorporate this new component going forward
We held off on packaging our main app in the docker-compose file since go binaries could not be live reloaded (on file changes) by default. We will use the popular Air framework to enable live reloading of our service on file changes and then package this via docker. We will also enable remote debugging of these services running in Docker
The OneHub service can be interacted by using CURL as well as grpc_cli. However a more custom CLI can make accessing and interacting with our service much more easier (and enjoyable). We will quickly build a simple CLI using the popular Cobra library for building CLI applications in Go.
While memory stores make it easy to start off building your services, it is very toilsome to re-seed your data on each load. We can overcome that by using a database to persist your data. In this is article let us persist our data using a popular relational database - Postgres - and the popular GORM (ORM) frameworks.