mirror of
https://git.envs.net/envs/ifconfig
synced 2024-11-26 06:33:46 +01:00
21 lines
286 B
Go
21 lines
286 B
Go
package main
|
|
|
|
import (
|
|
"github.com/astaxie/beego"
|
|
_ "github.com/missdeer/ifconfig/routers"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
HostVar = "VCAP_APP_HOST"
|
|
PortVar = "VCAP_APP_PORT"
|
|
)
|
|
|
|
func main() {
|
|
var port string
|
|
if port = os.Getenv(PortVar); port == "" {
|
|
port = "8080"
|
|
}
|
|
beego.Run(":" + port)
|
|
}
|