diff --git a/emacs/init.org b/emacs/init.org index c6fd853..b5ce3a4 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -3111,12 +3111,20 @@ Some functions to make my day job easier. (direnv-update-directory-environment (eshell/pwd)) (pyvenv-workon venv))) - (defun lola-server () - (interactive) + (defun lola-server (&optional no-gunicorn) + (interactive "P") (with-venv "lola-server" (with-default-directory "~/lola/lola-server" (with-env-from-file "~/lola/lola-server/.env" - (run-service "lola-server" "python" "bin/start_web.py"))))) + (if (not no-gunicorn) + (run-service "lola-server" + "gunicorn" + "-c" + "server/web/gunicorn.conf.py" + "-b" + "127.0.0.1:7200" + "bin.start_web:init_and_create_flask_app()") + (run-service "lola-server" "python" "bin/start_web.py")))))) (defun lola-server-celery-worker () (interactive)