ifconfig/main.go

22 lines
319 B
Go
Raw Permalink Normal View History

2014-08-14 06:15:52 +00:00
package main
import (
"os"
2017-01-20 07:38:47 +00:00
"github.com/astaxie/beego"
2019-09-13 20:48:37 +00:00
_ "github.com/envs-net/ifconfig/routers"
2014-08-14 06:15:52 +00:00
)
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)
2014-08-14 06:15:52 +00:00
}