Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-02-18 16:40:37 +03:00
parent d2bd0684c1
commit 1263531edd
3 changed files with 148 additions and 11 deletions

View File

@@ -616,16 +616,21 @@ func main() {
),
)
port := strings.TrimSpace(os.Getenv("HTTPPORT"))
host := strings.TrimSpace(os.Getenv("API_HOST"))
port := strings.TrimSpace(os.Getenv("API_PORT"))
if host == "" {
host = "0.0.0.0"
}
if port == "" {
port = "8080"
}
if !strings.HasPrefix(port, ":") {
port = ":" + port
}
log.Println("Server calisiyor: http://localhost" + port)
log.Fatal(http.ListenAndServe(port, handler))
addr := host + ":" + port
log.Println("🚀 Server running at:", addr)
log.Fatal(http.ListenAndServe(addr, handler))
}
func mountSPA(r *mux.Router) {