nf/xtest/basic/main.go

18 lines
261 B
Go
Raw Normal View History

2024-01-12 19:18:33 +08:00
package main
import (
"github.com/loveuer/nf"
"log"
)
func main() {
app := nf.New(nf.Config{EnableNotImplementHandler: true})
2024-01-12 19:18:33 +08:00
2024-02-20 15:34:00 +08:00
api := app.Group("/api")
api.Get("/1", func(c *nf.Ctx) error {
return c.SendString("nice")
2024-02-01 18:06:07 +08:00
})
log.Fatal(app.Run(":80"))
2024-01-12 19:18:33 +08:00
}