package main

import (
	"log"
	"net/http"
    "os"
)

func main() {
	var g GMHook
	err := http.ListenAndServe(":"+os.Getenv("PORT"), g)
	if err != nil {
		log.Fatal(err)
	}
}
package main

import (
	"log"
	"net/http"
)

func main() {
	var g GMHook
	err := http.ListenAndServe("localhost:4000", g)
	if err != nil {
		log.Fatal(err)
	}
}
--- 
+++ 
@@ -3,11 +3,12 @@
 import (
 	"log"
 	"net/http"
+    "os"
 )
 
 func main() {
 	var g GMHook
-	err := http.ListenAndServe("localhost:4000", g)
+	err := http.ListenAndServe(":"+os.Getenv("PORT"), g)
 	if err != nil {
 		log.Fatal(err)
 	}
Make sure to bind to the correct port
