Added address config

git-svn-id: file:///srv/svn/repo/mai/trunk@24 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
manerakai 2023-09-02 12:43:19 +00:00
parent 62ef51aa54
commit 1962522f39

View File

@ -4,6 +4,7 @@ import (
"bytes"
"net/http"
"net/url"
"os"
"time"
"codeberg.org/SimpleWeb/SimplyTranslate/engines"
@ -215,5 +216,9 @@ func main() {
app.Static("/static", "./static")
app.Listen(":3000")
address := os.Getenv("ADDRESS")
if address == "" {
address = "127.0.0.1:3000"
}
app.Listen(address)
}