Skip to content

Commit

Permalink
fix: Use new vercel.json config properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lfavole committed Nov 10, 2024
1 parent 61002e8 commit c4dbd7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
6 changes: 6 additions & 0 deletions api/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).parent))

from website.wsgi import app # noqa
24 changes: 6 additions & 18 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}

0 comments on commit c4dbd7b

Please sign in to comment.