ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
rux::gui::ServerOptions Struct Reference

Everything rux gui needs to stand a server up. More...

#include <Server.hpp>

Collaboration diagram for rux::gui::ServerOptions:

Public Attributes

std::filesystem::path project
 The single project this server is bound to for its lifetime.
std::string bind_address = "127.0.0.1"
 Interface to bind.
uint16_t port = 8420
 TCP port.
unsigned threads = 0
 Crow worker threads. 0 means hardware concurrency.
std::vector< std::string > allowed_origins
 Extra browser origins permitted to call the API, beyond loopback (which is always allowed).
std::filesystem::path asset_dir
 Frontend bundle directory.
bool open_browser = true
 Launch the system browser at the server URL once it is listening.

Detailed Description

Everything rux gui needs to stand a server up.

Definition at line 26 of file Server.hpp.

Member Data Documentation

◆ allowed_origins

std::vector<std::string> rux::gui::ServerOptions::allowed_origins

Extra browser origins permitted to call the API, beyond loopback (which is always allowed).

Needed only when the frontend is served from somewhere that is not localhost. Cross-origin requests from anything not listed are refused with 403 — there is no authentication here, so a wildcard would let any page the user visits read the project and start pipeline stages.

Definition at line 48 of file Server.hpp.

◆ asset_dir

std::filesystem::path rux::gui::ServerOptions::asset_dir

Frontend bundle directory.

Empty selects the search order in gui/assets.hpp, falling back to the built-in placeholder page.

Definition at line 52 of file Server.hpp.

◆ bind_address

std::string rux::gui::ServerOptions::bind_address = "127.0.0.1"

Interface to bind.

Defaults to loopback: this server has no authentication and executes pipeline stages, so exposing it on a routable interface is a deliberate act, not an accident.

Definition at line 33 of file Server.hpp.

◆ open_browser

bool rux::gui::ServerOptions::open_browser = true

Launch the system browser at the server URL once it is listening.

Definition at line 55 of file Server.hpp.

◆ port

uint16_t rux::gui::ServerOptions::port = 8420

TCP port.

0 is rejected — Crow gives no way to read back an ephemeral port, so a caller could not tell where to connect.

Definition at line 37 of file Server.hpp.

◆ project

std::filesystem::path rux::gui::ServerOptions::project

The single project this server is bound to for its lifetime.

Definition at line 28 of file Server.hpp.

◆ threads

unsigned rux::gui::ServerOptions::threads = 0

Crow worker threads. 0 means hardware concurrency.

Definition at line 40 of file Server.hpp.


The documentation for this struct was generated from the following file: