initial commit
This commit is contained in:
commit
c1c8747136
6 changed files with 70 additions and 0 deletions
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
|
@ -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
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -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"]
|
12
dub.json
Normal file
12
dub.json
Normal file
|
@ -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"
|
||||
}
|
18
dub.selections.json
Normal file
18
dub.selections.json
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
17
source/app.d
Normal file
17
source/app.d
Normal file
|
@ -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!");
|
||||
}
|
BIN
vibe-docker
Executable file
BIN
vibe-docker
Executable file
Binary file not shown.
Loading…
Reference in a new issue