func Main(cfg *Config) {
	srv, err := newServer(cfg)
	if err != nil {
		log.Fatalf("could not create server: %s", err)
	}
	srv.Setup()
	srv.Run()
}
Main sets up and runs the API server with the given configuration.
package server
import "log"