uhhh lots of things
All checks were successful
All checks were successful
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user