Added address config
git-svn-id: file:///srv/svn/repo/mai/trunk@24 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"codeberg.org/SimpleWeb/SimplyTranslate/engines"
|
"codeberg.org/SimpleWeb/SimplyTranslate/engines"
|
||||||
@@ -215,5 +216,9 @@ func main() {
|
|||||||
|
|
||||||
app.Static("/static", "./static")
|
app.Static("/static", "./static")
|
||||||
|
|
||||||
app.Listen(":3000")
|
address := os.Getenv("ADDRESS")
|
||||||
|
if address == "" {
|
||||||
|
address = "127.0.0.1:3000"
|
||||||
|
}
|
||||||
|
app.Listen(address)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user