import vibe.d;
import std.stdio;
shared static this()
{
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.");
}
void hello(HTTPServerRequest req, HTTPServerResponse res){
writeln("running once or twice?");
res.writeBody("Yep you are here...");
}
I created a simple project, I noticed that things are running twice?
the console says
Please open http://127.0.0.1:8080/ in your browser
running once or twice?
running once or twice?
It is definitely running twice, why is that?