updates webserver docstring

This commit is contained in:
Mose Müller 2023-12-19 16:12:04 +01:00
parent 728eea09f6
commit 2f5c415cd5

View File

@ -30,7 +30,15 @@ class WebServer:
The WebServer class initializes and manages a web server environment using FastAPI
and Socket.IO, allowing for HTTP and WebSocket communications. It incorporates CORS
(Cross-Origin Resource Sharing) support, custom CSS, and serves a frontend static
files directory.
files directory. It also initializes web server settings based on configuration
files or generates default settings if necessary.
Configuration for the web server (like service settings directory and whether to
generate new web settings) is determined in the following order of precedence:
1. Values provided directly to the constructor.
2. Environment variable settings (via configuration classes like ServiceConfig and
WebServerConfig).
3. Default values defined in the configuration classes.
Args:
data_service_observer (DataServiceObserver): Observer for the DataService,
@ -43,6 +51,11 @@ class WebServer:
frontend. If None, no custom styles are applied. Defaults to None.
enable_cors (bool, optional): Flag to enable or disable CORS policy. When True,
CORS is enabled, allowing cross-origin requests. Defaults to True.
service_settings_dir (Path | None, optional): Path to the configuration
directory where the web settings will be stored. Defaults to None.
generate_new_web_settings (bool | None, optional): Flag to enable or disable
generation of new web settings if the configuration file is missing. Defaults
to None.
**kwargs (Any): Additional unused keyword arguments.
"""