MCPcopy Create free account
hub / github.com/cifertech/DisplayKit / _static_root

Function _static_root

server/main.py:34–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def _static_root() -> Path:
35 raw = os.environ.get("DISPLAYKIT_STATIC_ROOT", "").strip()
36 root = Path(raw).resolve() if raw else REPO_ROOT
37 if not root.is_dir():
38 raise RuntimeError(
39 f"Static root is not a directory: {root}. "
40 "Set DISPLAYKIT_STATIC_ROOT to a folder containing index.html, app.js, …"
41 )
42 return root
43
44
45def _trusted_hosts() -> list[str] | None:

Callers 1

create_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected