Merge remote-tracking branch 'origin/master'
This commit is contained in:
17
svc/main.go
17
svc/main.go
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user