use host 0.0.0.0

This commit is contained in:
Waylon Walker 2023-06-02 15:52:59 -05:00
parent 0d205ebd5e
commit 15f7c998c7
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4

View file

@ -7,6 +7,7 @@ from sqlalchemy import create_engine
from sqlmodel import SQLModel, Session
from learn_sql_model.standard_config import load
from rich.console import Console
if TYPE_CHECKING:
from sqlalchemy import Engine
@ -17,6 +18,7 @@ class ApiServer(BaseModel):
port: int = 5000
reload: bool = True
log_level: str = "info"
host: str = "0.0.0.0"
class Database:
@ -90,4 +92,5 @@ def get_db(config: Config = None, reset_db_state=Depends(reset_db_state)):
def get_config(overrides: dict = {}) -> Config:
raw_config = load("learn_sql_model")
config = Config(**raw_config, **overrides)
Console().print('starting learn-sql-model api with config:', config)
return config