Github User Fetcher 1.0.0
C Application with Server and GUI
|
Entry point for the application. Parses command-line arguments and either starts the HTTP server or fetches and displays a GitHub user. More...
#include "config.hpp"
#include "server.hpp"
#include "user.hpp"
#include <iostream>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Main function that initializes and runs the application. | |
Entry point for the application. Parses command-line arguments and either starts the HTTP server or fetches and displays a GitHub user.
This file contains the main function which acts as the orchestrator of the program. It interprets the configuration from the user, and based on that configuration, it either launches a local HTTP server or performs a GitHub API request to fetch user data, then displays it to stdout.
Definition in file main.cpp.
int main | ( | int | argc, |
char ** | argv ) |
Main function that initializes and runs the application.
This function performs the following steps:
run_server
is true, launches the HTTP server on the specified port.Any exceptions thrown during the execution are caught and logged to stderr
, with a non-zero return code indicating failure.
argc | Argument count. |
argv | Argument vector. |
Definition at line 35 of file main.cpp.
References parse_arguments(), and start_http_server().