Skip to content

Commit

Permalink
fix: update Vercel function handler
Browse files Browse the repository at this point in the history
  • Loading branch information
fox1t committed Sep 22, 2023
1 parent 3399817 commit 8f9d5bb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 106 deletions.
8 changes: 8 additions & 0 deletions api/vercel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createApp } from '../dist/app.js'

const app = createApp()

export default async function (req, res) {
await app.ready()
app.server.emit('request', req, res)
}
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@google-cloud/storage": "6.9.2",
"@hapi/boom": "10.0.0",
"@sinclair/typebox": "0.25.21",
"@vercel/node": "1.12.1",
"ajv": "8.12.0",
"aws-sdk": "2.1310.0",
"azure-storage": "^2.10.7",
Expand Down Expand Up @@ -98,14 +97,6 @@
"node": ">=18.0.0"
},
"packageManager": "pnpm@8.6.3",
"keywords": [
"turborepo",
"monorepo",
"remote",
"cache"
],
"files": [
"dist",
"vercel.json"
]
"keywords": ["turborepo", "monorepo", "remote", "cache"],
"files": ["api", "dist", "vercel.json"]
}
48 changes: 12 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions src/vercel.ts

This file was deleted.

42 changes: 0 additions & 42 deletions test/vercel.ts

This file was deleted.

9 changes: 1 addition & 8 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
{
"version": 2,
"builds": [
{
"src": "./src/vercel.ts",
"use": "@vercel/node"
}
],
"rewrites": [
{
"source": "/(.*)",
"destination": "/src/vercel.ts"
"destination": "/api/vercel.js"
}
]
}

0 comments on commit 8f9d5bb

Please sign in to comment.