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
|
||
|
}
|