1.源码实现
#include <crow.h>
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/")([](){
return "Hello world";
});
app.port(18080).multithreaded().run();
}
2.编译源码
$ g++ -o helloworld helloworld.cpp -I$HOME/local/include -std=c++11 -lboost_system -lpthread
3.运行程序
$ ./helloworld
网友评论