mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
22 lines
380 B
Go
22 lines
380 B
Go
package minio
|
|
|
|
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)
|
|
}
|