summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.zig7
1 files changed, 7 insertions, 0 deletions
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();