How can i set deployment command in node project

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"
  }
}

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

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.

2 Likes

hey thanks a lot it worked

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.