forked from WEB-IMB-WS2526/lab-development-imb
21 lines
397 B
Go
21 lines
397 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
func appleFunc(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintln(w, "🍎 Apple func antwortet")
|
|
}
|
|
|
|
func bananaFunc(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintln(w, "🍌 Banana func antwortet")
|
|
}
|
|
|
|
func main() {
|
|
http.HandleFunc("/apple", appleFunc)
|
|
http.HandleFunc("/banana", bananaFunc)
|
|
http.ListenAndServe("localhost:8080", nil)
|
|
}
|