Skip to content

Commit

Permalink
fix: go build 相对路径错误
Browse files Browse the repository at this point in the history
  • Loading branch information
laorange committed May 28, 2022
1 parent c6b2c3a commit 1230378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ func main() {
http.Handle("/", http.FileServer(http.FS(dist)))

// windows
exec.Command(`cmd`, `/c`, `start`, `http://127.0.0.1:`+PORT+"/static/").Start()
exec.Command(`cmd`, `/c`, `start`, `http://127.0.0.1:`+PORT+"/dist/").Start()

// mac
exec.Command(`open`, `http://127.0.0.1:`+PORT+"/static/").Start()
// exec.Command(`open`, `http://127.0.0.1:`+PORT+"/dist/").Start()

http.ListenAndServe(":"+PORT, nil)
}

0 comments on commit 1230378

Please sign in to comment.