Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolethanh authored Nov 15, 2022
1 parent 80fcf3c commit 13b1eed
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,42 @@
# frlog
fiber routes log


## Install
```sh
go get github.com/zerolethanh/frlog
```

## Usage

```go

func main() {
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
app.Post("/login", func(c *fiber.Ctx) error {
return c.SendString("Login")
})
app.Get("/user/:id", func(c *fiber.Ctx) error {
return c.SendString("User")
})
app.Patch("/fly/:from-:to", func(c *fiber.Ctx) error {
return c.SendString("Fly")
})

frlog.PrintAppStacks(app)

log.Fatalln(app.Listen(":3000"))
}

```

> Output:
<img width="313" alt="Ảnh màn hình 2022-11-15 lúc 18 53 41" src="https://user-images.githubusercontent.com/2741804/201913350-b5f806e9-3bdf-4b80-b121-6c98d768648f.png">


## LICENSE
MIT

0 comments on commit 13b1eed

Please sign in to comment.