Skip to content

Commit

Permalink
Add main call to examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 committed May 4, 2019
1 parent 3394f85 commit 5426f9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ proc main() {.async.} =
let value = await redisClient.get("nim_redis:test")
assert(value == "Hello, World")
waitFor main()
```

There is also a synchronous version of the client, that can be created using the `open()` procedure rather than `openAsync()`.
Expand Down
2 changes: 2 additions & 0 deletions src/redis.nim
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
## let value = await redisClient.get("nim_redis:test")
##
## assert(value == "Hello, World")
##
## waitFor main()

import net, asyncdispatch, asyncnet, os, strutils, parseutils, deques, options

Expand Down

0 comments on commit 5426f9a

Please sign in to comment.