wilzbach / vibe-d-by-example

Showcasing Vibe.d's features by simple examples
12 stars 1 forks source link

Vibe.d by Example

Travis

Every example can be directly executed and will start a web server listening on port 8080 if dub (D's package manager) is installed. To get dub, refer to the downloads page.

Basic examples

vibe.web.web

How to run an example

Start the server for an example

./hello

Start the client for an example

dub --single -b unittest hello.d

Alternatively, you can also use:

make bin/hello.client

Start both the server and client for an example

make bin/hello.test

How to run all examples?

make all

TODO

Common problems

SSL

Vibe.d uses OpenSSL 1.0 by default. This often causes problems. However, it's easy to use openssl-1.1 or botan.

CLI

--override-config vibe-d:tls/openssl-1.1

dub.sdl

dependency "vibe-d:tls" version="~>0.8.2"
subConfiguration "vibe-d:tls" "openssl-1.1"

dub.json

{
    ...
    "dependencies": {
        ...
        "vibe-d:tls": "*"
    },
    "subConfigurations": {
        ...
        "vibe-d:tls": "openssl-1.1"
    }
}