func (m *FakeMarketplace) StartSync() error {
	m.Server = &http.Server{
		Addr:    fmt.Sprintf("localhost:%d", m.Port),
		Handler: Routes(m),
	}
	return m.Server.ListenAndServe()
}
StartSync starts the server or returns an error if it couldn't be started
package marketplace
import (
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"strconv"
	"github.com/go-zoo/bone"
	"github.com/manifoldco/grafton"
	"github.com/manifoldco/grafton/connector"
	"github.com/manifoldco/grafton/db"
	"github.com/manifoldco/grafton/marketplace/primitives"
	"github.com/manifoldco/grafton/marketplace/routes"
)
type FakeMarketplace struct {
	Port      uint
	Product   *primitives.FakeProductData
	DB        *db.DB
	Connector *connector.FakeConnector
	GC        *grafton.Client
	Server    *http.Server
}
func New(connector *connector.FakeConnector, port uint, pAPI *url.URL,
	signer grafton.Signer, data *primitives.FakeProductData) *FakeMarketplace {
	fm := &FakeMarketplace{
		Port:      port,
		Product:   data,
		DB:        connector.DB,
		Connector: connector,
	}
	cURL, err := url.Parse("http://localhost:" + strconv.Itoa(int(connector.Config.Port)))
	if err != nil {
		panic("Failed to parse connector url for Grafton client: " + err.Error())
	}
	fm.GC = grafton.New(pAPI, cURL, signer, nil)
	return fm
}