https://github.com/andrewlalis/handy-httpd
Extremely lightweight HTTP server for D.
https://github.com/andrewlalis/handy-httpd
beginner-friendly dlang http-server
Last synced: about 1 month ago
JSON representation
Extremely lightweight HTTP server for D.
- Host: GitHub
- URL: https://github.com/andrewlalis/handy-httpd
- Owner: andrewlalis
- License: mit
- Created: 2021-12-15T20:48:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-05T23:49:16.000Z (5 months ago)
- Last Synced: 2025-01-06T00:29:49.961Z (5 months ago)
- Topics: beginner-friendly, dlang, http-server
- Language: D
- Homepage:
- Size: 10.4 MB
- Stars: 35
- Watchers: 5
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-d - Handy-Httpd - A simple, lightweight, and well-documented HTTP server that lets you bootstrap ideas and have something up and running in minutes. (Web Frameworks / Bare metal / kernel development)
README
# handy-httpd



An extremely lightweight HTTP server for the [D programming language](https://dlang.org/).
## Features
- HTTP/1.1
- [Web Sockets](https://andrewlalis.github.io/handy-httpd/guide/handlers/websocket-handler.html)
- [Simple configuration](https://andrewlalis.github.io/handy-httpd/guide/configuration.html)
- High performance with interchangeable request processors
- Beginner friendly
- Extensible with custom handlers, exception handlers, and filters
- [Well-documented](https://andrewlalis.github.io/handy-httpd/)
- [Prioritises testability](https://andrewlalis.github.io/handy-httpd/guide/testing.html)
- Ships with some handy pre-made request handlers:
- Serve static files with the [FileResolvingHandler](https://andrewlalis.github.io/handy-httpd/guide/handlers/file-resolving-handler.html)
- Apply filters before and after handling requests with the [FilteredHandler](https://andrewlalis.github.io/handy-httpd/guide/handlers/filtered-handler.html)
- Handle complex URL paths, including path parameters and wildcards, with the [PathHandler](https://andrewlalis.github.io/handy-httpd/guide/handlers/path-handler.html)## Links
- [Documentation](https://andrewlalis.github.io/handy-httpd/)
- [Examples](https://github.com/andrewlalis/handy-httpd/tree/main/examples)
- [Dub Package Page](https://code.dlang.org/packages/handy-httpd)
- [Bugs/Feature Requests](https://github.com/andrewlalis/handy-httpd/issues)
- [User Feedback Form](https://docs.google.com/forms/d/e/1FAIpQLSdazfaKLghGk1XpefOyDdHFfSZLaHQlCaeI9KAsaIMR5iNX6A/viewform?usp=sf_link)## Simple Example
```d
import handy_httpd;void main() {
new HttpServer((ref HttpRequestContext ctx) {
ctx.response.writeBodyString("Hello world!");
}).start();
}
```