mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 20:30:55 +00:00
Merge pull request #318 from pengfei-xue/devel
add server host:port info when starting app
This commit is contained in:
commit
fbd1c3f8b0
5
app.go
5
app.go
@ -28,10 +28,14 @@ func (app *App) Run() {
|
|||||||
if HttpPort != 0 {
|
if HttpPort != 0 {
|
||||||
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
|
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BeeLogger.Info("Runing on %s", addr)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
l net.Listener
|
l net.Listener
|
||||||
)
|
)
|
||||||
|
|
||||||
if UseFcgi {
|
if UseFcgi {
|
||||||
if HttpPort == 0 {
|
if HttpPort == 0 {
|
||||||
l, err = net.Listen("unix", addr)
|
l, err = net.Listen("unix", addr)
|
||||||
@ -72,6 +76,7 @@ func (app *App) Run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
BeeLogger.Critical("ListenAndServe: ", err)
|
BeeLogger.Critical("ListenAndServe: ", err)
|
||||||
time.Sleep(100 * time.Microsecond)
|
time.Sleep(100 * time.Microsecond)
|
||||||
|
Loading…
Reference in New Issue
Block a user