Skip to content

Commit

Permalink
[snap] fix path for axolotl web #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nanu-c committed Dec 21, 2019
1 parent 4019dad commit dc7da43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/webserver/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,12 @@ func wsReader(conn *websocket.Conn) {
}

func webserver() {
path := "."
path := "./axolotl-web/dist"
if len(os.Getenv("SNAP")) > 0 {
path = os.Getenv("SNAP") + "/bin"
path = os.Getenv("SNAP") + "/bin/axolotl-web/"
}
log.Debugln("[axoltol] axoltol-web path", path+"/axolotl-web/dist")
http.Handle("/", http.FileServer(http.Dir(path+"/axolotl-web/dist")))
log.Debugln("[axoltol] axoltol-web path", path)
http.Handle("/", http.FileServer(http.Dir(path)))
http.HandleFunc("/attachments", attachmentsHandler)
http.HandleFunc("/avatars", avatarsHandler)
http.HandleFunc("/ws", wsEndpoint)
Expand Down

0 comments on commit dc7da43

Please sign in to comment.