GitBucket
Toggle navigation
Pull requests
Issues
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Fork
: 0
johnpearcey
/
dub_jkp
Browse code
Cleanup http listener in vibed template
master
1 parent
e7e06a5
commit
09952a65933a79770b6f3a74b97ac4f4c350412b
Christian Koestlin
authored
on 30 Dec 2020
The Dlang Bot
committed
on 31 Dec 2020
Patch
Unified
Split
Showing
1 changed file
+5
-5
■
■
■
■
■
source/dub/init.d
Ignore Space
Show notes
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
();
}
Show line notes below