A high-performance, multi-threaded HTTP 1.1 server written in Nim.
ℹ️ This HTTP server is designed to utilize epoll-like OS APIs and does not support Windows by design.
⚠️ This library is not yet hardened against common HTTP security exploits. If you use it in production, do so behind a reverse proxy like nginx.
Current features include:
- Built on the Nim
selectors
module, making efficient use of epoll on Linux and kqueue on macOS. - Automatic parallelization; compile with
--threads:on
to enable. - Support for HTTP pipelining.
- On-demand parsing to handle only the requested data.
- Integration with Nim's
asyncdispatch
, allowing async/await in request callbacks.
Create a helloHttp.nimble
file:
# Package
version = "0.1.0"
author = "Siddhant Singh"
description = "A basic HTTP server using the httpdaddy library."
license = "MIT"
srcDir = "src"
bin = @["helloHttp"]
# Dependencies
requires "nim >= 1.0.0"
requires "httpdaddy >= 0.4.0"