blob: 06936c55893e9e020de06b2ceaaa3d76ea7f0e11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "crow/app.h"
#include "crow/mustache.h"
#include "handlers.hpp"
int main(int argc, char *argv[]) {
crow::SimpleApp app;
CROW_ROUTE(app, "/")
([]() {
auto page = crow::mustache::load("index.html");
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;
}
|