forked from WEB-IMB-WS2526/lab-development-imb
21 lines
413 B
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)
|
|
}
|