diff --git a/server/py/fastapi_server/main.py b/server/py/fastapi_server/main.py index b73892d..36a1e40 100644 --- a/server/py/fastapi_server/main.py +++ b/server/py/fastapi_server/main.py @@ -26,9 +26,9 @@ class db: pool = None host = "192.168.1.208" - user = "suricata" + user = "yt2mp3_nuxt" db_name = "yt2mp3_nuxt" - pwd = "19_P@NDCATA" + pwd = "JJ7ZEyDm!XAGFb_z" @asynccontextmanager @@ -90,7 +90,7 @@ def set_metadata_and_rename(mp3_file: str, name: str, artist: str = None, album: # Configuration (customize these!) -DOWNLOAD_FOLDER = "downloads" # Where the converted files will be saved +DOWNLOAD_FOLDER = os.environ.get("DOWNLOAD_FOLDER","downloads") # Where the converted files will be saved if not os.path.exists(DOWNLOAD_FOLDER): os.makedirs(DOWNLOAD_FOLDER) @@ -181,4 +181,6 @@ async def me_get_endpoint(req: Request): if __name__ == "__main__": - uvicorn.run(app, host="127.0.0.1", port=8003) \ No newline at end of file + listen_host = str(os.environ.get("HOST", "127.0.0.1")) + listen_port = int(os.environ.get("PORT", 3000)) + uvicorn.run(app,host=listen_host,port=listen_port) \ No newline at end of file