publapi/utils/port.go
Odyssey 2a827841c9 Arya fix it
Signed-off-by: Odyssey <odyssey346@disroot.org>
2023-01-07 16:33:51 +01:00

15 lines
190 B
Go

package utils
import (
"os"
)
// GetPort returns the port to listen on
func GetPort() string {
port := os.Getenv("PUBLAPI_PORT")
if port == "" {
port = "3000"
}
return ":" + port
}