From fc02fbea2484c59bb00a446b104e7cc86a87d67e Mon Sep 17 00:00:00 2001 From: Erik Thuning <boooink@gmail.com> Date: Tue, 18 Feb 2025 17:54:24 +0100 Subject: [PATCH] Added wsgi file for production deploy --- application.wsgi | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 application.wsgi diff --git a/application.wsgi b/application.wsgi new file mode 100644 index 0000000..df1bbd5 --- /dev/null +++ b/application.wsgi @@ -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