Quick question, when I want to serve html files with Vue scripts inside/Vue files, will I need anything more complicated than for example:
vueTemplate.Execute(w, nil)
As all of the complexity for the rendering will be handled by the Vue file itself? For anyone that's used Vue, how do you handle the execution of the Vue files from Go? Thanks in advance.
评论:
forfunc:
Personally I use https://github.com/mholt/caddy
I build the final production assets to static html, css and js, than I serve them on path "/" inside my reverse proxy and on the route "/api" I let the go application serve his requests. This way everything is decoupled from each other.