From 4482049b944fac0a73b86e227a0f5334fcba7e91 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sat, 2 Nov 2024 08:42:15 -0400 Subject: [PATCH] log: Show the version number in the welcome banner. --- src/httpd.js.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/httpd.js.c b/src/httpd.js.c index bccba1d9..c824fc3f 100644 --- a/src/httpd.js.c +++ b/src/httpd.js.c @@ -10,6 +10,7 @@ #include "tlscontext.js.h" #include "trace.h" #include "util.js.h" +#include "version.h" #include "ow-crypt.h" @@ -33,6 +34,7 @@ #define CYAN "\e[1;36m" #define MAGENTA "\e[1;35m" +#define YELLOW "\e[1;33m" #define RESET "\e[0m" const int64_t k_refresh_interval = 1ULL * 7 * 24 * 60 * 60 * 1000; @@ -423,7 +425,7 @@ static JSValue _httpd_endpoint_start(JSContext* context, JSValueConst this_val, *listener = (httpd_listener_t) { .context = context, .tls = JS_DupValue(context, argv[1]) }; tf_tls_context_t* tls = tf_tls_context_get(listener->tls); int assigned_port = tf_http_listen(http, port, tls, _httpd_listener_cleanup, listener); - tf_printf(CYAN "~😎 Tilde Friends" RESET " is now up at " MAGENTA "http%s://127.0.0.1:%d/" RESET ".\n", tls ? "s" : "", assigned_port); + tf_printf(CYAN "~😎 Tilde Friends" RESET " " YELLOW VERSION_NUMBER RESET " is now up at " MAGENTA "http%s://127.0.0.1:%d/" RESET ".\n", tls ? "s" : "", assigned_port); return JS_NewInt32(context, assigned_port); }