I have built an app using Node js, Express and typescript. npm run build
builds the app and npm start
serves the app. It works perfectly on local but I am having trouble when deploying it to the Vercel.
Here is my packages.json script
"scripts": {
"start": "cross-env NODE_ENV=production node dist/server.js",
"build": "swc src -d dist --source-maps --copy-files",
"serve": "cross-env NODE_ENV=development node dist/server.js",
},
My folder structure. dist/server.js is my root file.
When I deploy the code it returns 404: NOT_FOUND Code: NOT_FOUND ID: bom1::fw9qg-1722258606228-23fe271eb94c