Created
August 14, 2021 02:28
-
-
Save timotheecour/612afab3314b30e3c15ad9ba7e97a628 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when defined case4: | |
# still bug | |
import asynchttpserver, asyncdispatch | |
var server = newAsyncHttpServer() | |
proc cb(req: Request) {.async.} = | |
await req.respond(Http200, "Hello World case4") | |
let port = 5001 | |
echo "test this with: curl localhost:" & $port.uint16 & "/" | |
waitFor server.serve(Port(port), cb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment