2018-11-27 10:03:22 +01:00
|
|
|
import vibe.vibe;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
auto settings = new HTTPServerSettings;
|
|
|
|
settings.port = 8080;
|
2018-11-27 20:31:20 +01:00
|
|
|
settings.bindAddresses = ["::", "0.0.0.0"];
|
2018-11-27 10:03:22 +01:00
|
|
|
listenHTTP(settings, &hello);
|
|
|
|
|
|
|
|
logInfo("Please open http://127.0.0.1:8080/ in your browser.");
|
|
|
|
runApplication();
|
|
|
|
}
|
|
|
|
|
2018-11-27 20:31:20 +01:00
|
|
|
void hello(HTTPServerRequest, HTTPServerResponse res)
|
2018-11-27 10:03:22 +01:00
|
|
|
{
|
2018-11-28 22:11:38 +01:00
|
|
|
res.writeBody("Hello, from Docker!");
|
2018-11-27 10:03:22 +01:00
|
|
|
}
|