merch-api/cmd/main.go
2026-03-04 17:02:11 +03:00

31 lines
565 B
Go

package main
import (
"context"
"merch-api/config"
_ "merch-api/docs"
"merch-api/internal/app"
"os"
"os/signal"
"syscall"
log "github.com/sirupsen/logrus"
)
// @Title Merch API
// @Version 2.3
// @Description Stores data about merch and prices
// @BasePath /api/v2
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
cfg := config.NewConfig()
config.LogSetup(cfg.App.Mode, cfg.App.LogLvl)
appl := app.New(ctx, cfg)
if err := appl.Run(ctx); err != nil {
log.Fatal(err)
}
}