Skip to content

Commit ae14e15

Browse files
authored
docs(fastapi): resolve base_path from the bootstrap file, not cwd (#61)
Path.cwd() depends on the execution directory; use Path(__file__).resolve().parent.parent to derive the project root from the bootstrap file location, matching the application starter template.
1 parent 58b5f88 commit ae14e15

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/fastapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ from providers.fastapi_provider import FastAPIProvider
3333
from config.fastapi import FastAPIConfig
3434

3535
app: Application = Application(
36-
base_path=str(Path.cwd()), # This always gives path relative to the execution.
36+
base_path=Path(__file__).resolve().parent.parent,
3737
providers=[
3838
LogProvider,
3939
(FastAPIProvider, FastAPIConfig),

0 commit comments

Comments
 (0)