diff --git a/main.go b/main.go index 66e79f0..07b7970 100644 --- a/main.go +++ b/main.go @@ -9,12 +9,18 @@ import ( ) func main() { - // Initialize i18n system if err := i18n.Init(); err != nil { log.Fatalf("Failed to initialize i18n: %v", err) } - http.HandleFunc("/", handler.DynamicHandler) + // bij /link redirect nr chromewebstore + http.HandleFunc("/link", func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, + "https://chromewebstore.google.com/detail/smartschool++/bdhficnphioomdjhdfbhdepjgggekodf", + http.StatusFound, + ) + }) + http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "content/static/favicon.ico") }) @@ -25,6 +31,8 @@ func main() { http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./content/static")))) http.Handle("/media/", http.StripPrefix("/media/", http.FileServer(http.Dir("./content/media")))) + http.HandleFunc("/", handler.DynamicHandler) + port := "9000" fmt.Println("Starting Smartschool++ HTTP server on port: " + port) if err := http.ListenAndServe(":"+port, nil); err != nil { diff --git a/smppmainhttpserver.exe b/smppmainhttpserver.exe old mode 100644 new mode 100755 index 2b1fc29..6ba05b0 Binary files a/smppmainhttpserver.exe and b/smppmainhttpserver.exe differ