rowdy
Automatically bind procs to the mummy web server
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install rowdy
choosenim install rowdy
git clone https://github.com/ajusa/rowdy
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| rowdy | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/ajusa/rowdy |
|---|---|
| Homepage | https://github.com/ajusa/rowdy |
| Registry Source | nimble_official |
README
rowdy
A library for mummy that allows you to bind a proc to the router, and automatically parse parameters into the proc arguments.
Example
import mummy, mummy/routers, rowdy
proc getPost(id: int): string =
"you requested a post with id " & $id
var router: Router
router.get(getPost)
router.get("/") do (request: Request):
request.respond(200, body = "the index")
let server = newServer(router)
echo "Serving on http://localhost:8080"
server.serve(Port(8080))
At this point, if you visit http://localhost:8080/getPost?id=4 you should see
you requested a post with id 4
API: rowdy
import rowdy
proc params
func params(req: Request): QueryParams {.raises: [ValueError].}
proc fromRequest
proc fromRequest(req: Request; k: string; v: var SomeInteger)
proc fromRequest
proc fromRequest(req: Request; k: string; v: var SomeFloat)
proc fromRequest
proc fromRequest(req: Request; k: string; v: var string) {.raises: [ValueError], tags: [].}
proc fromRequest
proc fromRequest(req: Request; k: string; v: var bool) {.raises: [ValueError], tags: [].}
proc fromRequest
proc fromRequest[T: object](req: Request; key: string; v: var T)
proc fromRequest
proc fromRequest[T: ref object](req: Request; key: string; v: var T)
proc fromRequest
proc fromRequest(req: Request; key: string; v: var Request)
template map
template map(router: var Router; methud: string; handler: proc)
template map
template map(router: var Router; methud, path: string; handler: proc)
template get
template get(router: var Router; handler: proc)
template put
template put(router: var Router; handler: proc)
template delete
template delete(router: var Router; handler: proc)
template post
template post(router: var Router; handler: proc)