20 lines
406 B
C++
20 lines
406 B
C++
#include <VWeb.h>
|
|
|
|
bool Ping(const VWeb::Request&, VWeb::Response& response) {
|
|
response << "Pong";
|
|
return true;
|
|
}
|
|
int main() {
|
|
using namespace VWeb;
|
|
VWeb::Server server;
|
|
auto& router = server.GetRouter();
|
|
router->Get("/test", [](const Request&, Response& response) {
|
|
response << "NICE";
|
|
return true;
|
|
});
|
|
router->Get("/ping", &Ping);
|
|
server.Start();
|
|
server.Join();
|
|
return 0;
|
|
}
|