diff options
Diffstat (limited to 'libs/cpp-httplib/example/hello.cc')
| -rw-r--r-- | libs/cpp-httplib/example/hello.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/cpp-httplib/example/hello.cc b/libs/cpp-httplib/example/hello.cc new file mode 100644 index 0000000..38d25a6 --- /dev/null +++ b/libs/cpp-httplib/example/hello.cc @@ -0,0 +1,19 @@ +// +// 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("0.0.0.0", 8080); +} |
