forked from ProjectSegfault/publapi
2a827841c9
Signed-off-by: Odyssey <odyssey346@disroot.org>
15 lines
190 B
Go
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
|
|
}
|