diff --git a/.gitignore b/.gitignore index 0defb5c..b580ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ **/*~ +oef_website + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..a00e97c --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.andreafazzi.eu/andrea/oef_website + +go 1.17 diff --git a/main.go b/main.go index 2eb8db3..1cf4061 100644 --- a/main.go +++ b/main.go @@ -5,10 +5,21 @@ import ( "net/http" ) -func main() { - fs := http.FileServer(http.Dir("public")) - http.Handle("/", fs) +func redirect(w http.ResponseWriter, r *http.Request) { - log.Println("Starting the web server for OEF...") - http.ListenAndServe(":3000", nil) + http.Redirect(w, r, "https://www.oief.it", 301) +} + +func main() { + // fs := http.FileServer(http.Dir("public")) + // http.Handle("/", fs) + + // log.Println("Starting the web server for OEF...") + // http.ListenAndServe(":3000", nil) + + http.HandleFunc("/", redirect) + err := http.ListenAndServe(":3000", nil) + if err != nil { + log.Fatal("ListenAndServe: ", err) + } } diff --git a/themes/ananke b/themes/ananke index cc963b3..813de5c 160000 --- a/themes/ananke +++ b/themes/ananke @@ -1 +1 @@ -Subproject commit cc963b323f5f798293fab69d24f7c83d9c3b9e75 +Subproject commit 813de5ccd6b1befd0d7efb7468402d3a7cb4913e