create and moove into new directories for BegushiyBashkir and

yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarbacreate and moove into new directories for BegushiyBashkir and
yalarba
This commit is contained in:
2025-10-24 05:22:44 +05:00
parent 358c14428f
commit 15357fd3c0
211 changed files with 3 additions and 3 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"log"
"api_tp/internal/config"
"api_tp/internal/server"
"api_tp/pkg/database"
)
func main() {
// Загрузка конфигурации
cfg := config.Load()
// Подключение к БД
db, err := database.NewPostgresConnection(cfg)
if err != nil {
log.Fatal("Failed to connect to database:", err)
}
// Создание и запуск сервера
srv := server.New(db)
log.Printf("Server starting on port %s", cfg.AppPort)
if err := srv.Run(cfg.AppPort); err != nil {
log.Fatal("Failed to start server:", err)
}
}