I have created an express typescript project on GitHub and trying to deploy to vercel. Below is the folder structure, and dist is where app.js will be in and src is where app.ts is in.
- dist
- dto
- middlewares
- models
- src
- .gitignore
- package.json
- package-lock.json
- README.md
- tsconfig.json
- vercel.json
And this is my vercel.json
{
"version": 2,
"builds": [
{
"src": "./app.js",
"use": "@vercel/node"
}
]
}
This is the setting on vercel when deploy
- build command: tsc -p .
- output directory: dist
- other settings are just default
Github url for this project is https://github.com/FrankJi1019/today-diary-backend, please feel free to take a look if my description is not clear enough
Thanks in advance!