This commit is contained in:
2021-05-26 04:15:57 -04:00
parent 0ae56e062c
commit 75f1a4d1c3
74 changed files with 5086 additions and 42 deletions
+20
View File
@@ -1,5 +1,25 @@
#include "HttpServer.h"
CHttpServer::CHttpServer()
{
mHttpServer = new QHttpServer;
mHttpServer->route("/", []()
{
qDebug("Test");
return "Ja Mon CB!!!!";
});
const auto port = mHttpServer->listen(QHostAddress::Any,8080);
qDebug("Server Opened");
}
CHttpServer::~CHttpServer()
{
delete mHttpServer;
}
+6 -1
View File
@@ -1,11 +1,16 @@
#ifndef HTTPSERVER_H
#define HTTPSERVER_H
#include <QtHttpServer/QHttpServer>
class CHttpServer
{
public:
QHttpServer *mHttpServer;
CHttpServer();
~CHttpServer();
};
#endif // HTTPSERVER_H
#endif // HTTPSERVER_H