use host 0.0.0.0
This commit is contained in:
parent
0d205ebd5e
commit
15f7c998c7
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue