handy-http-starter ~main

A collection of Handy-HTTP dependencies and common boilerplate code for starting a web server in minutes.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Handy-HTTP Starter

A collection of Handy-HTTP dependencies and common boilerplate code for starting a web server in minutes.

Here's how you can use this:

  1. Create your new project with dub init.
  2. Add the handy-http-starter dependency when prompted by Dub to add dependencies, or afterwards with dub add handy-http-starter.
  3. Start your server using the startServer function, as shown in the following example:
import handy_http_starter;

void main() {
    startServer((ref request, ref response) {
        response.headers.add("Content-Type", "text/plain");
        response.headers.add("Content-Length", "12");
        response.outputStream.write(cast(ubyte[]) "Hello world!")
    });
}

What's included?

When you add handy-http-starter to your project, you'll be transitively adding dependencies for all of the following components, at the highest version matching the major version of the starter:

  • Handy-HTTP Primitives for basic HTTP types and functions.
  • Handy-HTTP Transport for the HTTP server that handles connections and all the boring stuff in between the client and your request handler logic.
  • More to come as Handy-HTTP is developed!
Authors:
  • Andrew Lalis
Dependencies:
handy-http-transport, handy-http-primitives
Versions:
1.0.0 2025-Jan-14
~main 2025-Jan-14
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.0
Short URL:
handy-http-starter.dub.pm