2024-01-10 20:26:19 +08:00

22 lines
267 B
Go

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"))
}