Skip to content

Commit 70f0ca3

Browse files
committed
Heroku
1 parent 81dabd2 commit 70f0ca3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: go run *.go
1+
web: go-react-chat

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ func main() {
2020
wsHandler(hub, w, r)
2121
})
2222
// start server
23-
err := http.ListenAndServe(os.Getenv("PORT"), nil)
23+
port := ":" + os.Getenv("PORT")
24+
fmt.Println(port)
25+
err := http.ListenAndServe(port, nil)
2426
if err != nil {
2527
fmt.Println("ListenAndServeError:", err)
2628
}

0 commit comments

Comments
 (0)