Some checks failed
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm64:latest, aarch64-linux-gnu, arm64) (push) Successful in 2m37s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-arm:latest, arm-linux-gnueabihf, arm7) (push) Successful in 2m37s
Build and Deploy on Tag / 🔨 Build for PowerPC (push) Successful in 2m58s
Build and Deploy on Tag / 🔨 Build win32 and update the tap 🍺 (push) Failing after 3m36s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-riscv64:latest, riscv64-linux-gnu, riscv64) (push) Successful in 2m19s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x64:latest, x86_64-linux-gnu, amd64) (push) Successful in 2m21s
Build and Deploy on Tag / 🔨 Build for everything else (git.tesses.org/tesses50/linux-x86:latest, i386-linux-gnu, 386) (push) Successful in 2m6s
33 lines
911 B
C++
33 lines
911 B
C++
#include "TessesFramework/TessesFramework.hpp"
|
|
#include <iostream>
|
|
using namespace Tesses::Framework;
|
|
using namespace Tesses::Framework::Http;
|
|
using namespace Tesses::Framework::Streams;
|
|
using namespace Tesses::Framework::TextStreams;
|
|
using namespace Tesses::Framework::Threading;
|
|
|
|
int main(int argc, char **argv) {
|
|
TF_InitWithConsole();
|
|
|
|
uint16_t port = 4269;
|
|
|
|
Args args(argc, argv);
|
|
for (auto &item : args.options) {
|
|
if (item.first == "port")
|
|
port = (uint16_t)std::stoul(item.second);
|
|
}
|
|
|
|
if (args.positional.empty()) {
|
|
Console::WriteLine(args.filename + " [--port=] <url_root>");
|
|
return 1;
|
|
}
|
|
|
|
Tesses::Framework::Http::HttpServer server(
|
|
port, std::make_shared<ReverseProxyServer>(args.positional[0]));
|
|
server.StartAccepting();
|
|
TF_RunEventLoop();
|
|
std::cout << "Closing server" << std::endl;
|
|
TF_Quit();
|
|
|
|
return 0;
|
|
} |