This commit is contained in:
loveuer
2024-01-10 20:26:19 +08:00
commit b0435ccc35
14 changed files with 1382 additions and 0 deletions

21
example/simple/main.go Normal file
View File

@ -0,0 +1,21 @@
package main
import (
"errors"
"log"
"nf"
)
func main() {
app := nf.New()
app.Get("/hello", func(c *nf.Ctx) error {
return c.SendString("world")
})
app.Get("/world", func(c *nf.Ctx) error {
return errors.New("nice")
})
log.Fatal(app.Run(":7733"))
}