Browse Source

Code refactoring

Wirecog 6 years ago
parent
commit
70ba8199a0
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      isogoapp.go

+ 2
- 2
isogoapp.go View File

26
 	env.TemplateSet = ts
26
 	env.TemplateSet = ts
27
 	r := mux.NewRouter()
27
 	r := mux.NewRouter()
28
 	r.HandleFunc("/", handlers.IndexHandler)
28
 	r.HandleFunc("/", handlers.IndexHandler)
29
-	r.HandleFunc("/js/client.js", isokit.GopherjsScriptHandler)
30
-	r.HandleFunc("/js/client.js.map", isokit.GopherjsScriptMapHandler)
29
+	r.Handle("/js/client.js", isokit.GopherjsScriptHandler(WebAppRoot))
30
+	r.Handle("/js/client.js.map", isokit.GopherjsScriptMapHandler(WebAppRoot))
31
 	r.Handle("/template-bundle", handlers.TemplateBundleHandler(&env))
31
 	r.Handle("/template-bundle", handlers.TemplateBundleHandler(&env))
32
 
32
 
33
 	fs := http.FileServer(http.Dir(WebAppRoot + "/static"))
33
 	fs := http.FileServer(http.Dir(WebAppRoot + "/static"))