Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import strutils, sockets, httpserver
- var counter = 0
- proc handleRequest(client: TSocket, path, query: string): bool {.procvar.} =
- inc(counter)
- client.send("Hello for the $#th time." % $counter & wwwNL)
- return false # do not stop processing
- run(handleRequest, TPort(5000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement