Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <pistache/endpoint.h>
- using namespace Pistache;
- struct HelloHandler : public Http::Handler {
- HTTP_PROTOTYPE(HelloHandler)
- void onRequest(const Http::Request&, Http::ResponseWriter writer) override{
- writer.send(Http::Code::Ok, "Hello, World!");
- }
- };
- int main() {
- Http::listenAndServe<HelloHandler>("*:9080");
- }
Advertisement
Add Comment
Please, Sign In to add comment