func Router() *mux.Router {
	router := mux.NewRouter()
	for _, route := range Routes {
		router.HandleFunc(
			route.Path,
			route.Handler,
		).Methods(route.Method)
	}
	router.Use(Logger)
	return router
}
Router returns a mux router
package handlers
import (
	"fmt"
	"net/http"
	"github.com/gorilla/mux"
	log "github.com/sirupsen/logrus"
)
type Route struct {
	Path    string
	Method  string
	Handler http.HandlerFunc
}
var Routes = []Route{
	{"/", "GET", Index},
	{"/crawler/parse", "POST", ParseHandler},
}
func Index(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintf(w, "Hello World GoCrawler Node\n")
}
func Logger(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		log.WithFields(log.Fields{
			"path":   r.URL,
			"method": r.Method,
		}).Info("incoming request")
		next.ServeHTTP(w, r)
	})
}