Skip to content

Instantly share code, notes, and snippets.

@rubcuadra
Last active August 25, 2017 20:48
Show Gist options
  • Save rubcuadra/3694e163b23bafd45bceaa1045700a44 to your computer and use it in GitHub Desktop.
Save rubcuadra/3694e163b23bafd45bceaa1045700a44 to your computer and use it in GitHub Desktop.
Cpp endpoint, download https://github.com/rubcuadra/crow/blob/master/amalgamate/crow_all.h and rename it to crow.h, you must install g++ and boost library, if you are using a Mac you can do it with brew and after the installation you can compile it using : g++ example.cpp -std=c++11 -I/usr/local/include -L/usr/local/lib -lboost_system
#include "crow.h"
int main()
{
crow::SimpleApp app;
CROW_ROUTE(app, "/")
([]() {
return "Quick example using crow!";
});
app.port(8080).run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment