Use TUSD_PORT

This commit is contained in:
Felix Geisendörfer 2013-03-23 12:13:29 +01:00
parent 96b92970dd
commit 0f4b92b01d
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ func serveHttp() error {
http.HandleFunc("/", route)
addr := ":1080"
if port := os.Getenv("TUSD_PORT"); port != "" {
addr = ":"+port
}
log.Printf("serving clients at %s", addr)
return http.ListenAndServe(addr, nil)