diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-19 00:16:51 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-19 00:16:51 +0500 |
| commit | 4538bc8c7972fa0d9c4c23f038b2c5f2747f8edd (patch) | |
| tree | cd356ca5dd2259377f91313c835c05fc2d2c9e25 /web/src/main.cpp | |
| parent | ecca9314a53b961f49ae57528e30a3a17f5300dc (diff) | |
feat: WIKI PAGES
Diffstat (limited to 'web/src/main.cpp')
| -rw-r--r-- | web/src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/src/main.cpp b/web/src/main.cpp index 700e71a..06936c5 100644 --- a/web/src/main.cpp +++ b/web/src/main.cpp @@ -1,5 +1,6 @@ #include "crow/app.h" #include "crow/mustache.h" +#include "handlers.hpp" int main(int argc, char *argv[]) { crow::SimpleApp app; @@ -11,6 +12,10 @@ int main(int argc, char *argv[]) { return page.render(); }); + CROW_ROUTE(app, "/wiki")([]() { return botweb::get_wiki_page("/README"); }); + CROW_ROUTE(app, "/wiki/<path>") + ([](const std::string &path) { return botweb::get_wiki_page(path); }); + app.multithreaded().port(18083).run(); return 0; } |
