Skip to content

Commit 167eb27

Browse files
committed
Fix Vercel backend deployment configuration
- Update backend/vercel.json to build from TypeScript source - Fix root vercel.json for frontend-only deployment - Remove VITE_API_URL from GitHub Actions build step - Update frontend .env with production comments
1 parent e706068 commit 167eb27

File tree

6 files changed

+27
-143
lines changed

6 files changed

+27
-143
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ jobs:
5151
run: npm run lint
5252

5353
- name: Build all components
54-
env:
55-
VITE_API_URL: ${{ secrets.VITE_API_URL }}
5654
run: npm run build
5755

5856
- name: Test backend build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ backend/.env
3030
*.njsproj
3131
*.sln
3232
*.sw?
33+
.vercel

backend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"target": "ES2022",
44
"module": "commonjs",
5-
"lib": ["ES2022", "DOM"],
5+
"lib": ["ES2022"],
66
"outDir": "./dist",
77
"rootDir": "./src",
88
"strict": true,

backend/vercel.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22
"version": 2,
33
"builds": [
44
{
5-
"src": "dist/index.js",
5+
"src": "src/index.ts",
66
"use": "@vercel/node"
77
}
88
],
99
"routes": [
10-
{
11-
"src": "/api/(.*)",
12-
"dest": "/dist/index.js"
13-
},
1410
{
1511
"src": "/(.*)",
16-
"dest": "/dist/index.js"
12+
"dest": "src/index.ts"
1713
}
1814
],
1915
"env": {
2016
"NODE_ENV": "production"
17+
},
18+
"functions": {
19+
"src/index.ts": {
20+
"maxDuration": 10
21+
}
2122
}
2223
}

0 commit comments

Comments
 (0)