Dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user