Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
Use rootPath to find index.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbalogh-stripe committed Nov 22, 2014
1 parent 36c3690 commit 20f47cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Expand Up @@ -21,7 +21,7 @@ var jt jobTracker
var rootPath, staticPath string

func index(c web.C, w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join(staticPath, "index.html"))
http.ServeFile(w, r, filepath.Join(rootPath, "index.html"))
}

func getJobs(c web.C, w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -103,8 +103,8 @@ func init() {
log.Fatal(err)
}

rootPath = filepath.join(binPath, "..")
staticPath = filepath.join(rootPath, "static")
rootPath = filepath.Join(binPath, "..")
staticPath = filepath.Join(rootPath, "static")
}

func main() {
Expand Down

0 comments on commit 20f47cb

Please sign in to comment.