Initialize global state in the server examples

This commit is contained in:
2025-07-21 22:56:12 +02:00
parent 254bcbd666
commit 43627f81ab
6 changed files with 17 additions and 0 deletions
+3
View File
@@ -6,6 +6,8 @@
int main(void)
{
http_global_init();
// Choose the interface to listen on and the port.
// Currently, servers can only bind to IPv4 addresses.
HTTP_String addr = HTTP_STR("127.0.0.1");
@@ -90,6 +92,7 @@ int main(void)
// your server in a way to exit gracefully, this is
// you the server object is freed:
http_server_free(server);
http_global_free();
// Have fun. Bye!
return 0;