Perbaikan pembacaan data base

This commit is contained in:
2025-08-18 08:45:49 +07:00
parent a7d6005649
commit 6192a64f0a
23 changed files with 1833 additions and 743 deletions

View File

@@ -11,6 +11,8 @@ import (
"api-service/internal/server"
"github.com/joho/godotenv" // Import the godotenv package
_ "api-service/docs"
)
@@ -58,6 +60,11 @@ func gracefulShutdown(apiServer *http.Server, done chan bool) {
func main() {
log.Println("Starting API Service...")
// Load environment variables from .env file
if err := godotenv.Load(); err != nil {
log.Fatal("Error loading .env file")
}
server := server.NewServer()
// Create a done channel to signal when the shutdown is complete