Go Embed Vite
Go has a great feature that it can be packaged into a single binary which is easy for distribution. However when it comes to web application it’s a bit tricky becuase 1. you need to bind frontend assets into the binary and 2. you need to deal with the routing if you are building a single page application(SPA).
In this post I will walk you through how to embed a vite built react app into a go binary and how to handle the routing using gin framework.