fix: serve listener

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

No files matched your search

+3 -1
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))
}