You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
minio/server.go

21 lines
381 B

package minios
import (
"fmt"
"github.com/gorilla/mux"
"net/http"
)
type Server struct {
}
func (server *Server) Start() error {
r := mux.NewRouter()
r.HandleFunc("/", HelloHandler)
fmt.Println("Running http server on port 8080")
return http.ListenAndServe(":8080", r)
}
func HelloHandler(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Host: "+req.Host)
}