uhhh lots of things
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 16s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 14s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 24s

This commit is contained in:
2025-03-08 11:17:24 -05:00
parent 0a6d5b8a90
commit c6f36d0408
7 changed files with 222 additions and 44 deletions

View File

@ -13,8 +13,8 @@ class Server(BaseApplication):
host: str = "0.0.0.0",
port: int = 8080,
template_functions: Dict[str, Callable] = None,
enable_admin_browser: bool = False,
workers: int = multiprocessing.cpu_count() // 2 + 1,
access_log: bool = True,
options=None,
):
if template_functions is None:
@ -28,9 +28,9 @@ class Server(BaseApplication):
self.app.secret_key = "your_secret_key"
self.options = options or {
"bind": f"{self.host}:{self.port}",
"reload": True, # Enable automatic reloading
"reload": self.debug,
"threads": workers,
"accesslog": "-",
"accesslog": "-" if access_log else None,
}
for name, func in template_functions.items():
self.register_template_function(name, func)