24 lines
380 B
Go
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)
|
|
}
|
|
}
|