@@ -24,32 +24,30 @@ func main() {
2424
2525 http .Handle ("/static/" , http .FileServer (http .FS (content )))
2626
27- http .HandleFunc ("/shell" , shell )
28-
29- // not importent
30- http .HandleFunc ("/dev" , dev )
27+ http .HandleFunc ("/" , index )
28+ http .HandleFunc ("/index" , shell )
3129
30+ http .HandleFunc ("/shell" , shell )
3231 // standard endpoint
3332 http .HandleFunc ("/ws" , engine .Ws )
3433
3534 // endpoints for speed network
3635 http .HandleFunc ("/query" , engine .Request )
3736 http .HandleFunc ("/result" , engine .Response )
3837
38+ // for pages under development
39+ http .HandleFunc ("/dev" , dev )
40+
3941 log .Println (http .ListenAndServe (":1111" , nil ))
4042}
4143
4244// redirect to shell page temporary
4345func dev (w http.ResponseWriter , r * http.Request ) {
44- // TODO create index page
45- //http.Redirect(w, r, "http://localhost:1111/shell", http.StatusSeeOther)
4646 f , err := content .ReadFile ("static/dev.html" )
47-
4847 if err != nil {
4948 http .Error (w , err .Error (), http .StatusInternalServerError )
5049 return
5150 }
52-
5351 fmt .Fprint (w , string (f ))
5452}
5553
0 commit comments