Ver código fonte

Deploying to heroku for test

unknown 4 anos atrás
pai
commit
b4451e89b9
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      main.go

+ 2 - 2
main.go

@@ -26,7 +26,7 @@ func init() {
 var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
 
 func main() {
-
+	port := os.Getenv("PORT")
 	r := mux.NewRouter()
 
 	r.HandleFunc("/", PrinterList)
@@ -40,7 +40,7 @@ func main() {
 	fmt.Println("Server is listening...")
 
 	http.Handle("/", r)
-	http.ListenAndServe(":8888", nil)
+	http.ListenAndServe(":" + port, nil)
 }
 
 func generateCompatible(w http.ResponseWriter, r *http.Request){