aboutsummaryrefslogtreecommitdiff
path: root/back-end
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-08-27 22:28:34 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-08-27 22:28:34 -0400
commitafdeeb686f3aa022bec19084a337e233c622b4e3 (patch)
treef781d4b60e149244e58b58b44715a9a83c9d1fc1 /back-end
parent51a65e9196f35393817ba94721503afdfa76fb60 (diff)
pre backend update client performance bufs and fixes
Diffstat (limited to 'back-end')
-rw-r--r--back-end/src/CMNextEntry.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/back-end/src/CMNextEntry.cs b/back-end/src/CMNextEntry.cs
index 2382b33..2800c08 100644
--- a/back-end/src/CMNextEntry.cs
+++ b/back-end/src/CMNextEntry.cs
@@ -20,6 +20,9 @@
*/
using System;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
using VNLib.Plugins;
using VNLib.Utils.Logging;
@@ -46,6 +49,7 @@ namespace Content.Publishing.Blog.Admin
this.Route<ContentEndpoint>();
Log.Information("Plugin loaded");
+ PrintHelloMessage();
}
protected override void OnUnLoad()
@@ -57,5 +61,41 @@ namespace Content.Publishing.Blog.Admin
{
throw new NotImplementedException();
}
+
+ private void PrintHelloMessage()
+ {
+ const string template =
+@"
+******************************************************************************
+ CMNext - A dead-simple, multi-channel cms for your blog or podcast.
+ By Vaughn Nugent - vnpublic@proton.me
+ https://www.vaughnnugent.com/resources/software
+ License: GNU Affero General Public License v3.0
+ This application comes with ABSOLUTELY NO WARRANTY.
+
+ Your server is now running at the following locations:
+{0}
+******************************************************************************
+";
+ string[] interfaces = HostConfig.GetProperty("virtual_hosts")
+ .EnumerateArray()
+ .Select(e =>
+ {
+ JsonElement el = e.GetProperty("interface");
+ string ipAddress = el.GetProperty("address").GetString()!;
+ int port = el.GetProperty("port").GetInt32();
+ return $"{ipAddress}:{port}";
+ })
+ .ToArray();
+
+ StringBuilder sb = new();
+ foreach ( string intf in interfaces )
+ {
+ sb.Append('\t');
+ sb.AppendLine(intf);
+ }
+
+ Log.Information(template, sb);
+ }
}
} \ No newline at end of file