Setting up initial cli options and http handlers

This commit is contained in:
Frederick F. Kautz IV
2014-11-02 18:56:33 -05:00
parent d02e148236
commit fc6a2a45cb
7 changed files with 119 additions and 25 deletions
-21
View File
@@ -1,21 +0,0 @@
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)
}