fix: serve listener

This commit is contained in:
loveuer
2024-01-13 17:45:44 +08:00
parent 7c03a40ef0
commit f938487884
2 changed files with 8 additions and 7 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"github.com/loveuer/nf"
"log"
"net"
)
func main() {
@ -13,5 +14,6 @@ func main() {
return c.JSON(nf.Map{"status": 200, "data": "hello, " + name})
})
log.Fatal(app.Run("0.0.0.0:80"))
ln, _ := net.Listen("tcp", ":80")
log.Fatal(app.RunListener(ln))
}