Changed from C# based system to own C++ implementation using crow.

This commit is contained in:
douwe
2025-08-06 00:22:27 +02:00
parent 6f03c84264
commit 66b3863388
109 changed files with 5905 additions and 1131 deletions

8
src/main.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include "server.hpp"
int main() {
Douwco::Server server;
server.setup();
server.start();
return 0;
}

18
src/server.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include <crow.h>
#include "server.hpp"
void Douwco::Server::setup() {
CROW_ROUTE(crowApp, "/")([](){
std::string page = crow::mustache::load("home.html").render_string();
return page;
});
}
void Douwco::Server::start() {
crowApp
.port(port)
.multithreaded()
// .ssl_file("dev_cert/certificate.pem","dev_cert/private.key")
.run();
}