i selected others as framework as its a node web service and removed the build command as it doesnt need one, but i saw that it was being treated as a static site and my main index.js
’s code was being send to /
without the code actually running the deployment logs after build were empty
my package.json
{
"name": "backend",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"body-parser": "^1.20.3",
"btoa": "^1.2.1",
"cors": "^2.8.5",
"dotenv": "^16.4.7",
"dropbox": "^10.34.0",
"express": "^4.21.2",
"helmet": "^8.0.0",
"megajs": "^1.3.5",
"mongoose": "^8.9.5",
"morgan": "^1.10.0",
"querystring": "^0.2.1"
},
"devDependencies": {
"nodemon": "^3.1.9"
}
}
system
(system)
January 24, 2025, 7:27am
2
If you’re having trouble deploying an Express app, this guide can help.
You can also ask v0 for suggestions tailored to your own project setup.
another image, but sorry i cant show the url
anshumanb
(Anshuman Bhardwaj)
January 24, 2025, 8:15am
4
Hi @pratik12350 , welcome to the Vercel Community!
Thanks for reaching out here. We’ve recently published a post that discuses exactly what you’re trying to achieve. I’d recommend giving it a read.
Getting started
Express.js is one of the most popular framework choices for building a backend using Node.js. If you are starting a new Express project and want to deploy it to Vercel, we recommend you to follow the Using Express.js with Vercel guide.
Common patterns
If you are coming from an existing project, we’ve put together this example repository to showcase the common development patterns for Express apps.
We recommend hosting your frontend application on a separ…
2 Likes
hey thanks a lot it worked
2 Likes
system
(system)
Closed
January 31, 2025, 1:21pm
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.