haldis/app/passenger_wsgi.py
2020-07-17 11:40:15 +02:00

18 lines
385 B
Python

#!/usr/bin/env python3
"Script to run Haldis on a server"
import os
import sys
INTERP = os.path.expanduser("~/env/bin/python3")
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
sys.path.append(os.getcwd())
from app import create_app
application = create_app().app
# For running on the server with passenger etc
if __name__ == "__main__":
application.run()