This is how I deploy my Express app using TypeScript to Vercel free version
First, you need to create a new Vercel account and follow the steps to set up your account.
This is how my files structure looks like:
Then, you need to create a vercel.json file in the root directory of your project (like showed in the image above).
/vercel.json
{
"version": 2,
"builds": [
{
"src": "src/index.ts",
"use": "@vercel/node",
"config": { "includeFiles": ["src/**"] }
}
],
"routes": [
{
"src": "/(.*)",
"dest": "src/index.ts"
}
]
}
make sure to add environment variables in Vercel dashboard.