I have recently developed an Express TypeScript project on GitHub and now I am attempting to deploy it to Vercel. The folder structure of the project is as follows, with 'dist' containing app.js and 'src' containing app.ts.
- dist
- dto
- middlewares
- models
- src
- .gitignore
- package.json
- package-lock.json
- README.md
- tsconfig.json
- vercel.json
Below is the snippet from my vercel.json file:
{
"version": 2,
"builds": [
{
"src": "./app.js",
"use": "@vercel/node"
}
]
}
This is the configuration settings used for deployment on Vercel:
- build command: tsc -p .
- output directory: dist
- other settings remain default
For those who may need more clarity or want to explore the project further, here is the GitHub link: https://github.com/FrankJi1019/today-diary-backend. Your feedback and insights are greatly appreciated!
Thank you in advance!