KyleBanks / goggles

🔭 Goggles is a cross-platform GUI for your $GOPATH!
Apache License 2.0
671 stars 18 forks source link

Empty web view (?) #22

Closed leonklingele closed 7 years ago

leonklingele commented 7 years ago

What I did:

$ # clone this repo and cd into it
$ git rev-parse HEAD
a5b8070a9a91e49496c33217192dfb445e3aaa9b
$ npm install gulp
$ go get -u github.com/alexflint/gallium
$ go install github.com/alexflint/gallium/cmd/gallium-bundle
$ make

This opens an "empty" web view which looks like a directory listing: goggles

KyleBanks commented 7 years ago

Yikes, that's not right. Could I bug you for the following:

leonklingele commented 7 years ago

This patch fixes the issue for me:

diff --git a/server/server.go b/server/server.go
index d682d8a..bd6cdf9 100644
--- a/server/server.go
+++ b/server/server.go
@@ -18,7 +18,7 @@ import (
 //    /static/...
 func New(p api.Provider, root string) *http.ServeMux {
        mux := http.NewServeMux()
-       dir := http.Dir(filepath.Join(root, "static"))
+       dir := http.Dir(filepath.Join(root, "static/_static"))
        fs := http.FileServer(dir)
        mux.Handle("/", http.StripPrefix("/static/", fs))
        api.Bind(p, mux)
leonklingele commented 7 years ago
$ go version
go version go1.8 darwin/amd64
$ sw_vers -productVersion
10.11.6
KyleBanks commented 7 years ago

Great thanks, I think I see what the issue is - make is copying the static folders incorrectly for you, I'll see if I can figure out why. Seems like your .App contains:

static/_static

Instead of just:

static/

KyleBanks commented 7 years ago

@leonklingele this should be resolved now but unfortunately I was never able to reproduce to be certain. If you could verify it would be much appreciated!

leonklingele commented 7 years ago

Works fine, thank you! :)