diff --git a/sandbox/server/main.cpp b/sandbox/server/main.cpp index 4f2b8d7..b9df27a 100755 --- a/sandbox/server/main.cpp +++ b/sandbox/server/main.cpp @@ -1,12 +1,13 @@ #include #include -#define PORT 8000 +#define PORT 80 using namespace Bk::Net; int main() { + Bk::Log::init("Bakanet"); IpAddress ip; HttpServer server(ip, PORT); server.get("/", [](HttpRequest& req) @@ -19,12 +20,9 @@ int main() server.get("/home/", [](HttpRequest& req) { BK_INFO("URL /home"); - return HttpReponse("", ""); - }); - server.get("/home", [](HttpRequest& req) - { - BK_INFO("URL NEW /home"); - return HttpReponse("", ""); + HttpReponse res(HTTP_RES_200, req.version); + res.body = "

Coucou de /home/

"; + return res; }); server.start(); return 0;