From a83917beb806596988762943d3173a0109dc4a4d Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sat, 18 May 2024 16:52:53 +0500 Subject: feat: mustache templates --- web/src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web') 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; -- cgit v1.2.3