0
events.js:352
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::8800
    at Server.setupListenHandle [as _listen2] (net.js:1320:16)
    at listenInCluster (net.js:1368:12)
    at Server.listen (net.js:1454:7)

package.json:

{
  "name": "app2_api",
  "version": "1.0.0",
  "description": "app2_api",
  "main": "index.js",
  "scripts": {
    "test": "nodemon index.js"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "bcrypt": "^5.0.1",
    "dotenv": "^10.0.0",
    "express": "^4.17.1",
    "helmet": "^4.6.0",
    "jsonwebtoken": "^8.5.1",
    "mongoose": "^6.0.9",
    "morgan": "^1.10.0",
    "multer": "^1.4.3",
    "nodemon": "^2.0.12",
    "path": "^0.12.7"
  }
}

command to run the server:

npm run test

last lines of index.js:

app.listen(8800, () => {
  console.log("Backend server is running!");
});

1 Answers1

0

I am on Linux:

this worked:

pkill -f node