package main

import (
	"log/slog"
	"os"

	"git.schreifuchs.ch/lou-taylor/accounting/internal/api"
	"git.schreifuchs.ch/lou-taylor/accounting/internal/config"
)

func main() {
	cfg, err := config.Load("config.json")
	if err != nil {
		panic(err)
	}

	log := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelDebug}))
	api.Start(log, ":8080", cfg)
}
