Added wsgi file for production deploy

This commit is contained in:
Erik Thuning 2025-02-18 17:54:24 +01:00
parent b316356de7
commit fc02fbea24

12
application.wsgi Normal file

@ -0,0 +1,12 @@
#!/usr/bin/python3
from os.path import dirname, realpath, abspath
from inspect import getsourcefile
import sys
# Hack to auto-detect the current diectory and add it to the python path
scriptpath = dirname(realpath(abspath(getsourcefile(lambda:0))))
if scriptpath not in sys.path:
sys.path.insert(0, scriptpath)
from api import app