summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornetworkException <git@nwex.de>2022-09-04 22:24:21 +0200
committerLinus Groh <mail@linusgroh.de>2022-09-05 09:23:20 +0100
commit707b4f83eb42508bb318103bca72248c5a461e7e (patch)
tree4f7d5f9cd1ee0b9351dd5c258b957051d3e401c0
parentb29fbe96ddbedb23756341b326074c9377f5cbc2 (diff)
downloadserenity-707b4f83eb42508bb318103bca72248c5a461e7e.zip
WebServer: Make bound socket a clickable hyperlink :^)
This patch adds a hyperlink that can be hovered over and clicked on to open the WebServer's index page in Browser.
-rw-r--r--Userland/Services/WebServer/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Services/WebServer/main.cpp b/Userland/Services/WebServer/main.cpp
index b49d42852d..4d11498d91 100644
--- a/Userland/Services/WebServer/main.cpp
+++ b/Userland/Services/WebServer/main.cpp
@@ -92,7 +92,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(server->listen(ipv4_address.value(), port));
- outln("Listening on {}:{}", ipv4_address.value(), port);
+ out("Listening on ");
+ out("\033]8;;http://{}:{}\033\\", ipv4_address.value(), port);
+ out("{}:{}", ipv4_address.value(), port);
+ outln("\033]8;;\033\\");
TRY(Core::System::unveil("/etc/timezone", "r"));
TRY(Core::System::unveil("/res/icons", "r"));