Embed Vue In Go

A small demonstration of how to embed a Vue.js app in Go, giving you a single distributable binary with all of your assets

Development

  • In root folder, run: go run main.go -port 8081
  • In frontend folder, run: npm run serve
  • Visit localhost:8080 and begin development

Production

  • In frontend folder, run: npm run build
  • In root folder, run go build main.go
  • Run ./main
  • Visit localhost:8080 to see embedded application running

Prior Art

Further Resources