commit c1c874713692a4372c351fe1004b53fecea00188 Author: Johannes Loher Date: Tue Nov 27 10:03:22 2018 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..011f6e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +.dub +docs.json +__dummy.html +docs/ +vibe-docker.so +vibe-docker.dylib +vibe-docker.dll +vibe-docker.a +vibe-docker.lib +vibe-docker-test-* +*.exe +*.o +*.obj +*.lst diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f988178 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM dlang2/dmd-ubuntu +WORKDIR /dlang/vibe-docker +COPY . . + +RUN dub build -v + +EXPOSE 8080 + +CMD ["/dlang/vibe-docker/vibe-docker"] diff --git a/dub.json b/dub.json new file mode 100644 index 0000000..3c91ade --- /dev/null +++ b/dub.json @@ -0,0 +1,12 @@ +{ + "name": "vibe-docker", + "authors": [ + "Johannes Loher" + ], + "dependencies": { + "vibe-d": "~>0.8.4" + }, + "description": "A simple vibe.d server application.", + "copyright": "Copyright © 2018, Johannes Loher", + "license": "MIT" +} \ No newline at end of file diff --git a/dub.selections.json b/dub.selections.json new file mode 100644 index 0000000..f6e9f5b --- /dev/null +++ b/dub.selections.json @@ -0,0 +1,18 @@ +{ + "fileVersion": 1, + "versions": { + "botan": "1.12.10", + "botan-math": "1.0.3", + "diet-ng": "1.5.0", + "eventcore": "0.8.39", + "libasync": "0.8.3", + "libevent": "2.0.2+2.0.16", + "memutils": "0.4.13", + "mir-linux-kernel": "1.0.1", + "openssl": "1.1.6+1.0.1g", + "stdx-allocator": "2.77.4", + "taggedalgebraic": "0.10.12", + "vibe-core": "1.4.4", + "vibe-d": "0.8.4" + } +} diff --git a/source/app.d b/source/app.d new file mode 100644 index 0000000..bdfe867 --- /dev/null +++ b/source/app.d @@ -0,0 +1,17 @@ +import vibe.vibe; + +void main() +{ + auto settings = new HTTPServerSettings; + settings.port = 8080; + settings.bindAddresses = ["::1", "127.0.0.1"]; + listenHTTP(settings, &hello); + + logInfo("Please open http://127.0.0.1:8080/ in your browser."); + runApplication(); +} + +void hello(HTTPServerRequest req, HTTPServerResponse res) +{ + res.writeBody("Hello, World!"); +} diff --git a/vibe-docker b/vibe-docker new file mode 100755 index 0000000..f25c507 Binary files /dev/null and b/vibe-docker differ