diff --git a/libx/app.py b/api/app.py similarity index 100% rename from libx/app.py rename to api/app.py diff --git a/libx/__pycache__/__init__.cpython-312.pyc b/libx/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 48c4dd5..0000000 Binary files a/libx/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/vercel.json b/vercel.json index 6d3f75b..5445f2b 100644 --- a/vercel.json +++ b/vercel.json @@ -1,36 +1,26 @@ { - "builds": [ - { - "src": "www/libx/package.json", - "use": "@vercel/static-build", - "config": { - "installCommand": "yarn install", - "buildCommand": "yarn build", - "outputDirectory": "www/libx/dist" - } - }, - { - "src": "libx/app.py", - "use": "@vercel/python", - "config": { - "runtime": "python3.12", - "installCommand": "pip install pipenv && pipenv install --deploy", - "startCommand": "ENV=production FLASK_APP=libx/app.py FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000 flask run" - } + "functions": { + "libx/app.py": { + "runtime": "python@3.12.1", + "memory": 1024, + "maxDuration": 30, + "includeFiles": "libx/**" } - ], - "routes": [ + }, + "buildCommand": "pip install pipenv && pipenv install --deploy && yarn --cwd www/libx install && yarn --cwd www/libx build", + "outputDirectory": "www/libx/dist", + "rewrites": [ { - "src": "/api/(.*)", - "dest": "/libx/app.py" + "source": "/api/(.*)", + "destination": "/libx/app.py" }, { - "src": "/static/(.*)", - "dest": "/www/libx/dist/$1" + "source": "/static/(.*)", + "destination": "/www/libx/dist/$1" }, { - "src": "/(.*)", - "dest": "/libx/app.py" + "source": "/(.*)", + "destination": "/libx/app.py" } ] }