1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-10-18 05:14:19 +00:00
sii/cmd/sii-editor/frontend.go
Knut Ahlers ab39609f45
Implement Save-Game Editor (#1)
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-12-28 13:06:28 +00:00

14 lines
361 B
Go

package main
import "net/http"
func init() {
router.HandleFunc("/", handleIndexPage).Methods(http.MethodGet)
router.PathPrefix("/asset/").Handler(
http.StripPrefix("/asset/", http.FileServer(http.Dir("frontend"))),
).Methods(http.MethodGet)
}
func handleIndexPage(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "frontend/index.html")
}