Skip to content

Commit

Permalink
📦 chore: Added the ability to specify the path to the database
Browse files Browse the repository at this point in the history
  • Loading branch information
xitowzys committed Apr 4, 2023
1 parent 9c9cb2c commit 811db37
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 256 deletions.
2 changes: 2 additions & 0 deletions core/config/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@

DICT_ENVS["LOGSTASH_HOST"] = env.str("LOGSTASH_HOST")
DICT_ENVS["LOGSTASH_PORT"] = env.int("LOGSTASH_PORT")

DICT_ENVS["DATABASE_PATH"] = env.str("DATABASE_PATH", None)
2 changes: 1 addition & 1 deletion core/rest_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):

config: fastapi_gateway_auto_generate.Config = fastapi_gateway_auto_generate.Config(
fast_api_app=self.__app,
db_path="./database/database.db"
db_path=DICT_ENVS["DATABASE_PATH"] # "./database/database.db"
)

fastapi_gateway_auto_generate.Generator(config=config)
Expand Down
Loading

0 comments on commit 811db37

Please sign in to comment.