package srv

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

func StartServer() {
	var PORT string = os.Args[1]

	server := http.Server{
		Addr:    fmt.Sprintf(":%v", PORT),
		Handler: router,
	}

	fmt.Println("Server Running")

	err := server.ListenAndServe()
	if err != nil {
		log.Fatalf("Server error: %v", err)
		os.Exit(1)
	}
}
