Skip to content

Commit c91162c

Browse files
committed
fix: create root api.py entrypoint for Vercel Python detection
1 parent 8726764 commit c91162c

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎api.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"""Vercel serverless entry point for the roast API."""
2+
from web.api.roast import handler # noqa: F401

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ pythonpath = ["."]
2727
testpaths = ["tests"]
2828

2929
[tool.vercel]
30-
entrypoint = "web.api.roast:handler"
30+
entrypoint = "api:handler"

‎vercel.json‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"installCommand": "cd web && npm install",
33
"buildCommand": "cd web && npm run build",
4-
"outputDirectory": "web/.next"
4+
"outputDirectory": "web/.next",
5+
"rewrites": [
6+
{
7+
"source": "/gallery",
8+
"destination": "/web/.next/server/app/gallery.html"
9+
},
10+
{
11+
"source": "/roast/:id",
12+
"destination": "/web/.next/server/app/roast/[id]/page.html"
13+
}
14+
]
515
}

0 commit comments

Comments
 (0)