Cleanup http listener in vibed template
1 parent e7e06a5 commit 09952a65933a79770b6f3a74b97ac4f4c350412b
@Christian Koestlin Christian Koestlin authored on 30 Dec 2020
The Dlang Bot committed on 31 Dec 2020
Showing 1 changed file
View
10
source/dub/init.d
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
settings.bindAddresses = ["::1", "127.0.0.1"];
listenHTTP(settings, &hello);
auto listener = listenHTTP(settings, &hello);
scope (exit)
{
listener.stopListening();
}
 
logInfo("Please open http://127.0.0.1:8080/ in your browser.");
runApplication();
}