wip
This commit is contained in:
21
example/simple/main.go
Normal file
21
example/simple/main.go
Normal 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"))
|
||||
}
|
Reference in New Issue
Block a user