How to deploy API to Vercel
What's the easiest way to deploy a basic API endpoint to Vercel?
I made an Express app structured like:
api/index.js:
vercel.json:
The API just uploads files to S3 or GCS, so I'm open to using any other language or framework. It will mainly be used in my T3 app, but I found Next.js really confusing with handling files (tried to use HTML form, formidable, multer, ...)
Docs I followed:
* https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js
* https://vercel.com/guides/using-express-with-vercel#standalone-express
Vercel Documentation
Using the Node.js Runtime with Serverless Functions
Learn how to use the Node.js runtime to compile Node.js Serverless Functions on Vercel.
Vercel Documentation
How to Deploy an Express.js Application to Vercel
Learn how to deploy an Express.js application to Vercel using Serverless Functions.
Solution:Jump to solution
solved (solution is specific for my needs)
```ts
import { type File, type Files, IncomingForm } from 'formidable'
const form = new IncomingForm({ multiples: false })...
3 Replies
Tried it before and gave up on it. The customization needs to improve.
Solution
solved (solution is specific for my needs)