From 6eec2cfdbf7449d891e21288ec87a502d8022eb2 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Wed, 12 Jul 2017 00:43:50 +0200 Subject: [PATCH] Initial commit --- .gitignore | 9 +++++++++ Vagrantfile | 13 +++++++++++++ dub.sdl | 7 +++++++ dub.selections.json | 16 ++++++++++++++++ source/app.d | 16 ++++++++++++++++ 5 files changed, 61 insertions(+) create mode 100644 .gitignore create mode 100644 Vagrantfile create mode 100644 dub.sdl create mode 100644 dub.selections.json create mode 100644 source/app.d diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b2a796 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.dub +docs.json +__dummy.html +*.o +*.obj +__test__*__ + +doodul +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..46abae9 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,13 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "archlinux/archlinux" + + config.vm.network "forwarded_port", guest: 8080, host: 8080 + + config.vm.provision "shell", inline: <<-SHELL + pacman -Syu --noconfirm + pacman -S --noconfirm libevent liblphobos + SHELL +end diff --git a/dub.sdl b/dub.sdl new file mode 100644 index 0000000..25eca2a --- /dev/null +++ b/dub.sdl @@ -0,0 +1,7 @@ +name "doodul" +description "A multiplayer drawing game" +authors "Les De Ridder" +copyright "Copyright © 2017, Les De Ridder" +license "NCSA" +dependency "vibe-d" version="~>0.8.0" +versions "Have_botan" diff --git a/dub.selections.json b/dub.selections.json new file mode 100644 index 0000000..6d74245 --- /dev/null +++ b/dub.selections.json @@ -0,0 +1,16 @@ +{ + "fileVersion": 1, + "versions": { + "botan": "1.12.9", + "botan-math": "1.0.3", + "diet-ng": "1.2.1", + "eventcore": "0.8.12", + "libasync": "0.8.3", + "libevent": "2.0.2+2.0.16", + "memutils": "0.4.9", + "openssl": "1.1.5+1.0.1g", + "taggedalgebraic": "0.10.7", + "vibe-core": "1.0.0", + "vibe-d": "0.8.0" + } +} diff --git a/source/app.d b/source/app.d new file mode 100644 index 0000000..be432fa --- /dev/null +++ b/source/app.d @@ -0,0 +1,16 @@ +import vibe.vibe; + +void main() +{ + auto settings = new HTTPServerSettings; + settings.port = 8080; + 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!"); +}