File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -64,19 +64,7 @@ func lobby_handler(writer http.ResponseWriter, request *http.Request) {
64
64
}
65
65
66
66
func main () {
67
- // Static file serving
68
- server := http .FileServer (http .Dir ("./static" ))
69
- http .Handle ("/static/" , http .StripPrefix ("/static/" , server ))
70
-
71
- http .HandleFunc ("/" , home_handler )
72
- http .HandleFunc ("/login/" , login_handler )
73
- http .HandleFunc ("/register/" , register_handler )
74
- http .HandleFunc ("/lobby/" , lobby_handler )
75
-
76
- log .Fatal (http .ListenAndServe (":8000" , nil ))
77
-
78
67
// Database testing
79
-
80
68
var err error
81
69
82
70
config := mysql.Config {
@@ -93,4 +81,15 @@ func main() {
93
81
err = db .Ping ()
94
82
handle (err )
95
83
fmt .Println ("Success" )
84
+
85
+ // Static file serving
86
+ server := http .FileServer (http .Dir ("./static" ))
87
+ http .Handle ("/static/" , http .StripPrefix ("/static/" , server ))
88
+
89
+ http .HandleFunc ("/" , home_handler )
90
+ http .HandleFunc ("/login/" , login_handler )
91
+ http .HandleFunc ("/register/" , register_handler )
92
+ http .HandleFunc ("/lobby/" , lobby_handler )
93
+
94
+ log .Fatal (http .ListenAndServe (":8000" , nil ))
96
95
}
You can’t perform that action at this time.
0 commit comments