haldis/app/passenger_wsgi.py

18 lines
384 B
Python
Raw Normal View History

2019-09-11 20:47:06 +00:00
#!/usr/bin/env python3
2019-09-10 13:17:35 +00:00
"Script to run Haldis on a server"
2015-03-31 18:15:22 +00:00
import os
import sys
2019-09-11 20:47:06 +00:00
INTERP = os.path.expanduser("~/env/bin/python3")
2015-03-31 18:15:22 +00:00
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
sys.path.append(os.getcwd())
2019-09-11 20:47:06 +00:00
from app import create_app
application = create_app().app
# For running on the server with passenger etc
if __name__ == "__main__":
2019-09-11 20:47:06 +00:00
application.run()