Changeset 24 in code for trunk/web/main.go


Ignore:
Timestamp:
Sep 2, 2023, 12:43:19 PM (21 months ago)
Author:
manerakai
Message:

Added address config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/main.go

    r23 r24  
    55        "net/http"
    66        "net/url"
     7        "os"
    78        "time"
    89
     
    216217        app.Static("/static", "./static")
    217218
    218         app.Listen(":3000")
     219        address := os.Getenv("ADDRESS")
     220        if address == "" {
     221                address = "127.0.0.1:3000"
     222        }
     223        app.Listen(address)
    219224}
Note: See TracChangeset for help on using the changeset viewer.