add gunicorn

This commit is contained in:
Carneiro 2023-10-05 17:06:14 -03:00
parent 95daba5c8a
commit 8245ee3ab4
3 changed files with 8 additions and 6 deletions

2
gunicorn_config.py Normal file
View File

@ -0,0 +1,2 @@
workers = 4 # Adjust this based on your server's capabilities
bind = "0.0.0.0:8080" # Use the appropriate IP and port

View File

@ -2,3 +2,4 @@ bcrypt
flask flask
pyjwt pyjwt
tinydb tinydb
gunicorn

View File

@ -13,12 +13,11 @@ app = Flask(__name__)
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
def main(): # def main(*args, **kwargs):
app.register_blueprint(user_routes) app.register_blueprint(user_routes)
app.register_blueprint(stream_routes) app.register_blueprint(stream_routes)
app.run(host=settings.HOST, port=settings.PORT)
if __name__ == "__main__": if __name__ == "__main__":
main() app.run(host=settings.HOST, port=settings.PORT)
# main()