This is the first time, I tried to deploy my express server on Vercel. But, there are some issues probably. It didn't deploy correctly, I'm not sure why. However, localhost is running successfully. Getting 500: INTERNAL_SERVER_ERROR everytime.
I don't have any .envfiles as it's a practice project.
What I have tried:
package.json
"name": "assignment-1",
"version": "1.0.0",
"description": "In this project, I have written the first assignment of Programming Hero.",
"main": "index.js",
"engines": {
"node": "14.x"
},
"scripts": {
"start": "node index.js"
},
"keywords": [
"server",
"javaScript",
"node",
"express"
],
"author": "Riyad Hossain",
"license": "ISC",
"dependencies": {
"express": "^4.18.1"
}
}
vercel.json
"version": 2,
"builds": [
{
"src": "./index.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "/"
}
]
}
