package main

import (
	"context"
	"flag"
	"log"
	"os/signal"
	"syscall"

	"git.warky.dev/wdevs/amcs/internal/app"
)

func main() {
	var configPath string
	flag.StringVar(&configPath, "config", "", "Path to the YAML config file")
	flag.Parse()

	ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
	defer stop()

	if err := app.Run(ctx, configPath); err != nil {
		log.Fatal(err)
	}
}
