Skip to content

Commit

Permalink
added ability to override config path via environment
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTheNerd committed Jun 12, 2024
1 parent 5678a03 commit cab7500
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

app = FastAPI()

with open('config.json') as f:
config_path = os.environ.get('CONFIG_PATH', 'config.json')

with open(config_path) as f:
config = json.load(f)
users_config = config.get('users', {})

Expand Down

0 comments on commit cab7500

Please sign in to comment.