lab-development-imb/web/08/labor/loesungen/uebung01.go

21 lines
413 B
Go

package main
import (
"fmt"
"net/http"
)
func loginFunc(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Sie wurden erfolgreich eingeloggt.")
}
func logoutFunc(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Sie wurden erfolgreich ausgeloggt")
}
func main() {
http.HandleFunc("/login", loginFunc)
http.HandleFunc("/logout", logoutFunc)
http.ListenAndServe("localhost:8080", nil)
}