In the development machine, source files are in $GOPATH/src/github.com/myuser/myapp html are at $GOPATH/src/github.com/myuser/myapp/html static are at $GOPATH/src/github.com/myuser/myapp/static
It all works fine, both using go run … as using the binary.
When deploying (to a FreeBSD VPS), what I did was:
copy the binary to $HOME/go/
copy recursively html/ and static/ to $HOME/go/ as well, so ls $HOME/go
binary
html/
static/
But it seems that the app in the VPS can’t find some html file(s).
What am I missing?
Do I have to set GOPATH although I’m not using sources at the VPS?
Place the html/ in another place?
Recreate the directory structure of the development machine under $GOPATH?
What else?
Optional, some people (including me) use a deploy tool to copy and run the application in the same conditions on VPS as on your machine. A good one from my toolbox is the cloud tool.
Adjust the above examples as you need. Hope this will help.