Allow configurability of host port
This commit is contained in:
parent
6ebd94762b
commit
17de764649
1 changed files with 6 additions and 1 deletions
7
main.go
7
main.go
|
|
@ -40,6 +40,11 @@ func main() {
|
||||||
mux.HandleFunc("/ln", lnurlw_response)
|
mux.HandleFunc("/ln", lnurlw_response)
|
||||||
mux.HandleFunc("/cb", lnurlw_callback)
|
mux.HandleFunc("/cb", lnurlw_callback)
|
||||||
|
|
||||||
err := http.ListenAndServe(":9000", mux)
|
port := os.Getenv("HOST_PORT")
|
||||||
|
if len(value) == 0 {
|
||||||
|
port := "9000"
|
||||||
|
}
|
||||||
|
|
||||||
|
err := http.ListenAndServe(":" + port, mux)
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue