What is a package.json file, and what information does it contain?

The package.json file is the manifest of a Node.js project that contains metadata about the project, such as its name, version, dependencies, scripts, and more. It allows npm to manage the project’s dependencies and provides information necessary for installation and usage. Example content:

{
  "name": "my-app",
  "version": "1.0.0",
  "dependencies": {
    "express": "^4.17.1"
  },
  "scripts": {
    "start": "node index.js"
  }
}