mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 13:57:13 +00:00
19 lines
285 B
Go
19 lines
285 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func myFunc(rw http.ResponseWriter, rq *http.Request) {
|
|
rw.Write([]byte("Hello World"))
|
|
}
|
|
|
|
func main() {
|
|
r := mux.NewRouter()
|
|
r.PathPrefix("/").HandlerFunc(myFunc)
|
|
r.Methods("GET")
|
|
http.ListenAndServe(":8080", r)
|
|
}
|