cpp-httplib/example/hello.cc
2019-06-27 21:48:57 -04:00

19 lines
330 B
C++

//
// hello.cc
//
// Copyright (c) 2019 Yuji Hirose. All rights reserved.
// MIT License
//
#include <httplib.h>
using namespace httplib;
int main(void) {
Server svr;
svr.Get("/hi", [](const Request & /*req*/, Response &res) {
res.set_content("Hello World!", "text/plain");
});
svr.listen("localhost", 1234);
}