|
@@ -9,33 +9,7 @@ import (
|
9
|
9
|
"github.com/isomorphicgo/isogoapp/handlers"
|
10
|
10
|
)
|
11
|
11
|
|
12
|
|
-<<<<<<< HEAD
|
13
|
|
-var webappRoot string = os.Getenv("ISOGO_APP_ROOT")
|
14
|
|
-
|
15
|
|
-func indexHandler(w http.ResponseWriter, r *http.Request) {
|
16
|
|
- renderTemplate(w, webappRoot+"/templates/index.tmpl", nil)
|
17
|
|
-}
|
18
|
|
-
|
19
|
|
-// Template rendering function
|
20
|
|
-func renderTemplate(w http.ResponseWriter, templateFile string, templateData interface{}) {
|
21
|
|
-
|
22
|
|
- t, err := template.ParseFiles(templateFile)
|
23
|
|
- if err != nil {
|
24
|
|
- log.Fatal("Error encountered while parsing the template: ", err)
|
25
|
|
- }
|
26
|
|
- t.Execute(w, templateData)
|
27
|
|
-}
|
28
|
|
-
|
29
|
|
-func gopherjsScriptHandler(w http.ResponseWriter, r *http.Request) {
|
30
|
|
- http.ServeFile(w, r, webappRoot+"/client/client.js")
|
31
|
|
-}
|
32
|
|
-
|
33
|
|
-func gopherjsScriptMapHandler(w http.ResponseWriter, r *http.Request) {
|
34
|
|
- http.ServeFile(w, r, webappRoot+"/client/client.js.map")
|
35
|
|
-}
|
36
|
|
-=======
|
37
|
12
|
var WebAppRoot string = os.Getenv("ISOGO_APP_ROOT")
|
38
|
|
->>>>>>> 1f58dae263ab74226133033f55a2a449b05b4683
|
39
|
13
|
|
40
|
14
|
func main() {
|
41
|
15
|
|