merch-api/cmd/main.go
2026-02-23 18:34:38 +03:00

24 lines
380 B
Go

package main
import (
"context"
log "github.com/sirupsen/logrus"
"merch-api/config"
"merch-api/internal/app"
"os"
"os/signal"
"syscall"
)
func main() {
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer cancel()
cfg := config.NewConfig()
appl := app.New(cfg)
if err := appl.Run(ctx); err != nil {
log.Fatal(err)
}
}