diff options
| -rw-r--r-- | templates/index.html | 8 | ||||
| -rw-r--r-- | web/src/main.cpp | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..ccb2525 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,8 @@ +<!DOCTYPE> +<html> + <head> + </head> + <body> + <h1>hi</h1> + </body> +</html> diff --git a/web/src/main.cpp b/web/src/main.cpp index 248328f..2b4aaba 100644 --- a/web/src/main.cpp +++ b/web/src/main.cpp @@ -1,9 +1,15 @@ #include "crow/app.h" +#include "crow/mustache.h" int main(int argc, char *argv[]) { crow::SimpleApp app; - CROW_ROUTE(app, "/")([]() { return "hi"; }); + CROW_ROUTE(app, "/") + ([]() { + auto page = crow::mustache::load_text("index.html"); + + return page; + }); app.multithreaded().port(18083).run(); return 0; |
