1
0
mirror of https://git.envs.net/envs/ifconfig synced 2024-11-22 09:51:57 +01:00
ifconfig/main.go
2017-01-20 15:38:47 +08:00

22 lines
320 B
Go

package main
import (
"os"
"github.com/astaxie/beego"
_ "github.com/dfordsoft/ifconfig/routers"
)
const (
HostVar = "VCAP_APP_HOST"
PortVar = "VCAP_APP_PORT"
)
func main() {
var port string
if port = os.Getenv(PortVar); port == "" {
port = "8080"
}
beego.Run(beego.BConfig.Listen.HTTPAddr + ":" + port)
}