mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-12-05 09:28:23 -05:00
20 lines
330 B
C++
Executable File
20 lines
330 B
C++
Executable File
//
|
|
// 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", 8080);
|
|
}
|