Switch to gunicorn , need to add config file and proper password loading
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 16s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 28s

This commit is contained in:
2025-02-28 23:23:16 -05:00
parent c5caa0848b
commit 4d79f86df4
7 changed files with 429 additions and 28 deletions

10
main.py
View File

@ -3,6 +3,7 @@ from src.routes.routes import RouteManager
from src.config.args import create_parser
from src.config.config import Configuration
from src.rendering.helpers import TemplateHelpers
from src.server.file_manager import create_filemanager_blueprint
def main():
@ -15,6 +16,7 @@ def main():
r = RouteManager(c)
t = TemplateHelpers(c)
print("here")
server = Server()
server.register_template_function("get_sibling_content_files", t.get_sibling_content_files)
@ -27,7 +29,13 @@ def main():
server.register_route("/", r.default_route, defaults={"path": ""})
server.register_route("/<path:path>", r.default_route)
server.run()
file_manager_bp = create_filemanager_blueprint(c.content_dir, url_prefix='/admin', auth_password="password")
server.app.register_blueprint(file_manager_bp)
try:
server.run()
except Exception as e:
print(e)
if __name__ == "__main__":