~rick-rickspencer3/+junk/rest-cam

« back to all changes in this revision

Viewing changes to server.go

  • Committer: Rick Spencer
  • Date: 2016-01-12 14:32:57 UTC
  • Revision ID: rick.spencer@canonical.com-20160112143257-7qsdpb94ojuaqh3e
copying over html template into snap

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
 
88
88
func handleMainPage(w http.ResponseWriter, r *http.Request) {
89
89
        if( r.URL.Path == "/" ) {
90
 
                fp := path.Join("templates", "index.html")
 
90
                fp := path.Join( os.Getenv("$SNAP_APP_PATH"), "templates", "index.html")
91
91
        http.ServeFile(w, r, fp)
92
92
        } else {
93
93
                d := pathToSlice(r.URL.Path)