expose listen port as env var
This commit is contained in:
parent
96532e5ee9
commit
20f2859b7a
3
main.go
3
main.go
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -25,7 +26,7 @@ func main() {
|
|||
users = make(userList)
|
||||
users.loadFromFile("users.txt")
|
||||
http.HandleFunc("/logs/", logsHandler)
|
||||
if err := http.ListenAndServe(":8080", nil); err != nil {
|
||||
if err := http.ListenAndServe(":"+os.Getenv("QL_LISTEN_PORT"), nil); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue