This project is based on Dom96's perfect work on httpbeast and adds windows support(based on wepoll
namely IOCP).
It is also used by prologue.
nimble install httpx
Notes that multi-threads may be slower than single-thread!
-d:serverInfo:serverName
--threads:on
import options, asyncdispatch
import httpx
proc onRequest(req: Request): Future[void] =
if req.httpMethod == some(HttpGet):
case req.path.get()
of "/":
req.send("Hello World")
else:
req.send(Http404)
run(onRequest)
https://github.com/ringabout/websocketx
nimble install https://github.com/ringabout/websocketx