redo it with mongoose

add all previous POC api endpoints
This commit is contained in:
Aaron Kimbre
2025-01-02 16:11:45 -06:00
parent 070bec697c
commit e86f4e011b
18 changed files with 23916 additions and 935 deletions

View File

@@ -126,7 +126,7 @@ int main(int argc, char** argv) {
bool web_server_enabled = Game::config->GetValue("web_server_enabled") == "1";
ChatWebAPI chatwebapi(Game::config->GetValue("web_server_listen_ip"), GeneralUtils::TryParse<uint32_t>(Game::config->GetValue("web_server_listen_port")).value_or(8080));
auto chatwebapi = ChatWebAPI();
if (web_server_enabled) {
LOG("Web server enabled, will process http requests.");
@@ -154,7 +154,7 @@ int main(int argc, char** argv) {
}
//Check and handle web requests:
if (web_server_enabled) {
chatwebapi.HandleRequest();
chatwebapi.ReceiveRequests();
}
//Push our log every 30s: