jaimeMF / youtube-dl-api-server

A youtube-dl REST API server
https://youtube-dl-api-server.readthedocs.org/
The Unlicense
364 stars 212 forks source link

Help: Use a production WSGI server instead #82

Open korchix opened 2 years ago

korchix commented 2 years ago

Hello and thank you for this great API. when running the server using the command: youtube-dl-server i get a waring saying:

Serving Flask app 'youtube_dl_server.app' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.

can please someone help here to tell, what changes needed to be done, to run the server as WSGI. i made some google search and tried waitress and Gevent but unfortunately i didn't get it to work.

ja2142 commented 2 years ago

You can use gunicorn like this (running from root of this repository):

gunicorn --bind 127.0.0.1:8080 youtube_dl_server.app:app

There's also a pull request about docker (#78), I've commented with a Dockerfile using gunicorn, so you can use that as well.