Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"express": "^4.21.0",
"mongodb": "^5.7.0",
"mongoose": "^7.6.11",
"nodemon": "^3.0.1"
"nodemon": "^3.1.10"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

nodemon is a development utility and should be listed under devDependencies rather than dependencies. Including it in dependencies results in it being installed in production environments, which is unnecessary. This inflates the production image size and increases the potential attack surface.

Your Dockerfile uses supervisor to run the application, so nodemon is not used in the production container, further strengthening the case for this change.

To address this, please move nodemon to a new devDependencies section in your package.json.

Example:

  "dependencies": {
    "cors": "^2.8.5",
    "dotenv": "^16.3.1",
    "express": "^4.21.0",
    "mongodb": "^5.7.0",
    "mongoose": "^7.6.11"
  },
  "devDependencies": {
    "nodemon": "^3.1.10"
  }

}
}