package main

import (
	"log"

	"mrcc/internal/config"
	"mrcc/internal/httpserver"
	"mrcc/internal/logger"
)

func main() {
	cfg := config.Load("social-service", "8085")
	logger.WithService(cfg.Name).Info("starting service", "port", cfg.Port)

	srv := httpserver.New(cfg)

	// TODO: 注册社交路由
	// r := srv.Group("/api/user")
	// r.GET("/profile", ...)
	// r.GET("/achievements", ...)
	// r := srv.Group("/api/leaderboard")
	// r.GET("/", ...)

	log.Printf("social-service listening on %s", cfg.Address())
	if err := srv.Run(cfg.Address()); err != nil {
		log.Fatal(err)
	}
}
