安装好crow,可以写一个hello world来简单的使用crow
//test.cpp
#include <crow.h>
int main(){
crow::SimpleApp app;
CROW_ROUTE(app, "/test")([](){
return "Hello world";
});
app.port(8888).multithreaded().run();
}
编译:g++ test.cpp -o test -lpthread
运行编译好的程序:./test
浏览器打开:http://127.0.0.1:8888/test