diff --git a/api/app.py b/api/app.py new file mode 100644 index 0000000..2d98d92 --- /dev/null +++ b/api/app.py @@ -0,0 +1,6 @@ +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) + +from website.wsgi import app # noqa diff --git a/vercel.json b/vercel.json index 8433db9..059afcd 100644 --- a/vercel.json +++ b/vercel.json @@ -1,25 +1,13 @@ { - "builds": [ + "buildCommand": "bash build.sh", + "rewrites": [ { - "src": "website/wsgi.py", - "use": "@vercel/python" + "source": "/static/(.*)", + "destination": "/$1" }, { - "src": "build.sh", - "use": "@vercel/static-build", - "config": { - "distDir": "static" - } - } - ], - "routes": [ - { - "src": "/static/(.*)", - "dest": "$1" - }, - { - "src": "/(.*)", - "dest": "website/wsgi.py" + "source": "/(.*)", + "destination": "api/app.py" } ] }