Skip to content

Commit a5ab7dc

Browse files
committed
fix: root index.py for Vercel auto-detection, no tool.vercel entrypoint
1 parent e9abfdc commit a5ab7dc

4 files changed

Lines changed: 13 additions & 23 deletions

File tree

‎api/roast.py‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎index.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""Vercel serverless function entry point."""
2+
import importlib.util
3+
import os
4+
5+
_spec = importlib.util.spec_from_file_location(
6+
"roast_handler",
7+
os.path.join(os.path.dirname(__file__), "web", "api", "roast.py"),
8+
)
9+
_mod = importlib.util.module_from_spec(_spec)
10+
_spec.loader.exec_module(_mod)
11+
12+
handler = _mod.handler

‎pyproject.toml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@ roast = "roast.cli:app"
2525
[tool.pytest.ini_options]
2626
pythonpath = ["."]
2727
testpaths = ["tests"]
28-
29-
[tool.vercel]
30-
entrypoint = "web.api.roast:handler"

‎vercel.json‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,5 @@
22
"framework": "nextjs",
33
"installCommand": "npm install && cd web && npm install",
44
"buildCommand": "cd web && npm run build",
5-
"outputDirectory": "web/.next",
6-
"functions": {
7-
"api/roast.py": {
8-
"maxDuration": 60
9-
}
10-
}
5+
"outputDirectory": "web/.next"
116
}

0 commit comments

Comments
 (0)