Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updating README to include a code example for integration into echo web server.  

Related issue: #187 and credit to: https://github.com/tempor1s for solution.
  • Loading branch information
safaci2000 authored and hibiken committed Dec 18, 2022
1 parent 2cb4c8c commit 5c48e4e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,35 @@ func main() {
}
```

Example with [labstack/echo](https://github.com/labstack/echo)):


```go
package main

import (
"github.com/labstack/echo/v4"
"github.com/hibiken/asynq"
"github.com/hibiken/asynqmon"
)

func main() {
e := echo.New()

mon := asynqmon.New(asynqmon.Options{
RootPath: "/monitoring/tasks",
RedisConnOpt: asynq.RedisClientOpt{
Addr: ":6379",
Password: "",
DB: 0,
},
})
e.Any("/monitoring/tasks/*", echo.WrapHandler(mon))
e.Start(":8080")
}
```


## License

Copyright (c) 2019-present [Ken Hibino](https://github.com/hibiken) and [Contributors](https://github.com/hibiken/asynqmon/graphs/contributors). `Asynqmon` is free and open-source software licensed under the [MIT License](https://github.com/hibiken/asynq/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/publicdomain/zero/1.0/) license (CC0 1.0 Universal).

0 comments on commit 5c48e4e

Please sign in to comment.