func Start(cfg Config) *HTMLServer {
	ctx := context.Background()
	_, cancel := context.WithCancel(ctx)
	defer cancel()
	encoderCfg := zapcore.EncoderConfig{
		TimeKey:        "ts",
		MessageKey:     "msg",
		LevelKey:       "level",
		NameKey:        "parser",
		EncodeLevel:    zapcore.CapitalColorLevelEncoder,
		EncodeTime:     zapcore.ISO8601TimeEncoder,
		EncodeDuration: zapcore.StringDurationEncoder,
		EncodeName:     zapcore.FullNameEncoder,
	}
	core := zapcore.NewCore(zapcore.NewConsoleEncoder(encoderCfg), os.Stdout, zapcore.DebugLevel)
	logger := zap.New(core)
	defer logger.Sync()  
	var svc Service
	svc = ParseService{}
	svc = LoggingMiddleware(logger)(svc)
	endpoints := Endpoints{
		ParseEndpoint: MakeParseEndpoint(svc),
	}
	r := NewHttpHandler(ctx, endpoints)
	htmlServer := HTMLServer{
		server: &http.Server{
			Addr:           cfg.Host,
			Handler:        r,
			MaxHeaderBytes: 1 << 20,
		},
	}
	htmlServer.wg.Add(1)
	go func() {
		fmt.Printf("\n%s\nStarting ...%s",
			cfg.Version,
			htmlServer.server.Addr,
		)
		htmlServer.server.ListenAndServe()
		htmlServer.wg.Done()
	}()
	return &htmlServer
}
Start func launches Parsing service
package parse
import (
	"context"
	"fmt"
	"net/http"
	"os"
	"sync"
	"time"
	"go.uber.org/zap"
	"go.uber.org/zap/zapcore"
)
type Config struct {
	Host    string
	Version string
}
type HTMLServer struct {
	server *http.Server
	wg     sync.WaitGroup
}