package main

import (
	"mini_server/internal/config"
	"mini_server/internal/logger"
	"mini_server/internal/server"

	"github.com/sirupsen/logrus"
)

func init() {
	logger.Init_log()

}

func main() {

	address := config.ServerListenAddress
	dsn := config.MysqlDSN
	if srv, err := server.NewServer(address, dsn); err != nil {
		logrus.Errorf("服务初始化失败，错误信息:%v", err)
	} else if err = srv.Run(); err != nil {
		logrus.Errorf("服务启动失败，错误信息:%v", err)
	}
}
