fix: more intuitive port handling

This commit is contained in:
jabuxas 2024-09-18 10:16:03 -03:00
parent 4ed73c3086
commit 9d23b391fe
2 changed files with 3 additions and 2 deletions

View File

@ -43,11 +43,12 @@ func main() {
app.filesDir = "./files"
}
if app.port == ":" {
if app.port == "" {
slog.Info("running on default port")
app.port = ":3235"
} else {
slog.Info("running on modified port")
app.port = ":" + app.port
}
mux := http.NewServeMux()

View File

@ -30,7 +30,7 @@ ABYSS_URL=$ABYSS_URL
ABYSS_FILEDIR=$ABYSS_FILEDIR
# The port the server will run on, it's fine to leave it empty. Defaults to :3235
ABYSS_PORT=:$ABYSS_PORT
ABYSS_PORT=$ABYSS_PORT
# This is the username of the user for accessing /tree
AUTH_USERNAME=$AUTH_USERNAME