Hello,
For my nimnews package, I wanted to know what were the best HTTP server library options I had. For the moment, I'm using Jester but I'm not making use of the framework part at all as I prefer to split my code in procedure and not having to write all by handlers in the same place.
For the moment, I use Jester with things like this:
proc root*(req: Request): Future[ResponseData] {.async.} =
block route:
redirect("/group/")
Unfortunately this breaks in newer Jester 1.4.0 because redirect expects to be called from a context it does not have. See https://github.com/dom96/jester/issues/269.
I wanted to know what HTTP server there was out there with a rather complete implementation (I remember using the standard library server and it was missing code around parameter handling). I would need async support too.
Thank you for your ideas.
I was looking for people who used or wrote those libraries to get some feedbacks about them.
wanted to know what HTTP server there was out there with a rather complete implementation
Prologue should be a rather complete implementation of a HTTP server and the most featureful one written in Nim AFAIK.
hello,
If you have special requirements with HTTP parameter handling (https://www.iana.org/assignments/http-parameters/http-parameters.xhtml) I recommend you use a reverse proxy (it will also bring HTTP/2, security, buffering, TLS certificates, and more...). Myself, I used to use nginx, but have converted to Caddy (https://caddyserver.com/) lately.
If by HTTP parameters you mean HTML query parameters, they are not part of HTTP spec and therefore out of scope for HTTP servers. However, I just pushed bindings for uriparser to GitHub, so you can use it with any server: https://github.com/olliNiinivaara/uriparser-nimbinding
If async requirement is not a sine qua non for you, I suggest you to check out GuildenStern, too.