From 5f5aba042b51653dd6a8abcaa082fa5efcffd639 Mon Sep 17 00:00:00 2001
From: zachir <zachir@librem.one>
Date: Sat, 23 Mar 2024 22:27:02 -0500
Subject: Print some copyright info on server start

---
 src/main.zig | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'src')

diff --git a/src/main.zig b/src/main.zig
index ae53ca6..9b85d30 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -236,6 +236,11 @@ fn run_server(server: *http.Server, allocator: mem.Allocator) !void {
     }
 }
 
+pub fn print_info() void {
+    log.info("zhttpd version 0.1.0, Copyright (C) 2024 ZachIR", .{});
+    log.info("zhttpd comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the included LICENSE for more details", .{});
+}
+
 /// main() initializes the server, parses the IP and port, and beings
 /// run_server.
 /// main() can fail exit from server.listen() and run_server(), which do not
@@ -248,6 +253,8 @@ pub fn main() !void {
     defer debug.assert(gpa.deinit() == .ok);
     const allocator = gpa.allocator();
 
+    print_info();
+
     // Initialize the server
     var server = http.Server.init(allocator, .{ .reuse_address = true });
     defer server.deinit();
-- 
cgit v1.2.3