add setting port
This commit is contained in:
@@ -207,4 +207,4 @@ async def share(text: str = Form(default=None), style: str = Form(default='2'),
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
uvicorn.run('main:app', host='0.0.0.0', port=12345)
|
uvicorn.run('main:app', host='0.0.0.0', port=settings.PORT, debug=settings.DEBUG)
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ config = Config(".env")
|
|||||||
|
|
||||||
DEBUG = config('DEBUG', cast=bool, default=False)
|
DEBUG = config('DEBUG', cast=bool, default=False)
|
||||||
|
|
||||||
|
PORT = config('PORT', cast=int, default=12345)
|
||||||
|
|
||||||
DATABASE_URL = config('DATABASE_URL', cast=str, default="sqlite+aiosqlite:///database.db")
|
DATABASE_URL = config('DATABASE_URL', cast=str, default="sqlite+aiosqlite:///database.db")
|
||||||
|
|
||||||
DATA_ROOT = config('DATA_ROOT', cast=str, default="./static")
|
DATA_ROOT = config('DATA_ROOT', cast=str, default="./static")
|
||||||
|
|||||||
Reference in New Issue
Block a user