You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and dots ('.'), can be up to 35 characters long. Letters must be lowercase.
 
 
 

23 lines
472 B

#include <bakatools.h>
#include <bakanet.h>
#define PORT 80
using namespace Bk::Net;
int main()
{
Bk::Log::init("Bakanet");
IpAddress ip;
HttpServer server(ip, PORT);
server.get("/", [](HttpRequest& req)
{
HttpReponse res(HTTP_RES_200, req.version);
res.body = "<h1>Bakanet</h1>";
res.body += "<p>Working http server</p>";
res.body += "\n<p>URL /</p>";
return res;
});
server.start();
return 0;
}