Alterações para rodar no server
This commit is contained in:
parent
2b6ffdf3a7
commit
47f9e6ed1e
2 changed files with 2 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ class Settings(BaseSettings):
|
|||
db_pool_max_overflow: int = 10
|
||||
|
||||
# Configs da api
|
||||
host: str = '127.0.0.1' # no servidor use 0.0.0.0 pra aceitar conexões de qualquer máquina da rede
|
||||
port: int
|
||||
|
||||
settings = Settings()
|
||||
2
main.py
2
main.py
|
|
@ -12,4 +12,4 @@ app = FastAPI(
|
|||
app.include_router(api_router, prefix='/v1')
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app, host='127.0.0.1', port=settings.port)
|
||||
uvicorn.run(app, host=settings.host, port=settings.port)
|
||||
Loading…
Add table
Add a link
Reference in a new issue