import (
	"fmt"
	"log"
	"net/http"

	"webserver/routers"
)

func main() {
	endPoint := fmt.Sprintf("0.0.0.0:%d", 8000)
	server := &http.Server{
		Addr:    endPoint,
		Handler: routers.InitRouter(),
	}
	log.Printf("[info] start http server listening %s", endPoint)
	if err := server.ListenAndServe(); err != nil {
		log.Printf("start http server failed %s", err)
	}
}