1
0

feat: support PORT env

This commit is contained in:
Holegots 2023-06-28 00:05:19 +08:00
parent 58279b4009
commit f3865c1742

View File

@ -42,6 +42,9 @@ func init() {
HOST = os.Getenv("SERVER_HOST") HOST = os.Getenv("SERVER_HOST")
PORT = os.Getenv("SERVER_PORT") PORT = os.Getenv("SERVER_PORT")
if PORT == "" {
PORT = os.Getenv("PORT")
}
if HOST == "" { if HOST == "" {
HOST = "127.0.0.1" HOST = "127.0.0.1"
} }