diff --git a/src/main.cpp b/src/main.cpp index 9812e27..01fbf8d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,16 @@ extern "C" { #include "ternarytrie.h" } +static const std::string index_page = R"( + + +
+This is the URL shortener and pastebin accompanying my site, The Rusty Bever.
+ + +)"; + #define ENV(var, env_var) \ const char *_##var = getenv(env_var); \ if (_##var == NULL) { \ @@ -102,6 +112,9 @@ int main() { crow::SimpleApp app; app.loglevel(crow::LogLevel::Info); + CROW_ROUTE(app, "/").methods(crow::HTTPMethod::Get)( + []() { return crow::response("html", index_page); }); + // Serve an entry CROW_ROUTE(app, "/