From 760437326d499427cc40ffd7db6482d65e945338 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sat, 5 Jun 2021 18:55:06 +0530 Subject: add uvicorn command --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7c0a3bb..67475a1 100644 --- a/Makefile +++ b/Makefile @@ -30,4 +30,14 @@ cert-create: .PHONY: dev-ssl dev-ssl: cd app && ln -sf config_dev.py config.py - FLASK_APP=app python -m flask run --reload --debugger --cert=cert.pem --key=key.pem \ No newline at end of file + FLASK_APP=app python -m flask run --reload --debugger --cert=cert.pem --key=key.pem + +## Gunicorn Server with Uvicorn worker for FastAPI Support +.PHONY: gunicorn +gunicorn: + python -m gunicorn -w 1 api:app -k uvicorn.workers.UvicornWorker -b "0.0.0.0:8080" --reload + +## Uvicorn Server +.PHONY: uvicorn +uvicoen: + python -m uvicorn api:app --reload \ No newline at end of file -- cgit v1.2.3