add missing import to asynchttpserver's example
This commit is contained in:
parent
3e57c2f780
commit
7ef364a402
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ runnableExamples("-r:off"):
|
||||||
# This example will create an HTTP server on an automatically chosen port.
|
# This example will create an HTTP server on an automatically chosen port.
|
||||||
# It will respond to all requests with a `200 OK` response code and "Hello World"
|
# It will respond to all requests with a `200 OK` response code and "Hello World"
|
||||||
# as the response body.
|
# as the response body.
|
||||||
import std/asyncdispatch
|
import std/asyncdispatch, asynchttpserver
|
||||||
proc main {.async.} =
|
proc main {.async.} =
|
||||||
var server = newAsyncHttpServer()
|
var server = newAsyncHttpServer()
|
||||||
proc cb(req: Request) {.async.} =
|
proc cb(req: Request) {.async.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue