oef_website/main.go

26 lines
466 B
Go
Raw Permalink Normal View History

2019-11-11 16:52:47 +01:00
package main
import (
"log"
"net/http"
)
2021-10-28 09:28:12 +02:00
func redirect(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "https://www.oief.it", 301)
}
2019-11-11 16:52:47 +01:00
func main() {
2021-10-28 09:28:12 +02:00
// fs := http.FileServer(http.Dir("public"))
// http.Handle("/", fs)
// log.Println("Starting the web server for OEF...")
// http.ListenAndServe(":3000", nil)
2019-11-11 16:52:47 +01:00
2021-10-28 09:28:12 +02:00
http.HandleFunc("/", redirect)
err := http.ListenAndServe(":3000", nil)
if err != nil {
log.Fatal("ListenAndServe: ", err)
}
2019-11-11 16:52:47 +01:00
}