oef_website/main.go

25 lines
466 B
Go

package main
import (
"log"
"net/http"
)
func redirect(w http.ResponseWriter, r *http.Request) {
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)
}
}