Commit 3cb8a960 authored by astaxie's avatar astaxie

support unix socket fix #151

You can set
HttpAddr="/tmp/beego.sock"
HttpPort=0
parent 4f538e7f
......@@ -98,7 +98,11 @@ func NewApp() *App {
}
func (app *App) Run() {
addr := fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
addr := HttpAddr
if HttpPort != 0 {
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
}
var (
err error
l net.Listener
......@@ -134,7 +138,6 @@ func (app *App) Run() {
}
err = s.ListenAndServe()
}
}
if err != nil {
BeeLogger.Fatal("ListenAndServe: ", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment