freeCodeCamp Challenge Guide: How to Use package.json, the Core of Any Node.js Project or npm Package

How to Use package.json, the Core of Any Node.js Project or npm Package


Problem Explanation

Remember, you’re writing JSON, so make sure you use

  1. double quotes
  2. "key": value format
  3. the correct number of commas

Solutions

Solution 1 (Click to Show/Hide)
 {
  "name": "fcc-learn-npm-package-json",
  "author": "foobar",
  "dependencies": {
    "express": "^4.14.0"
  },
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "engines": {
    "node": "8.11.2"
  },
  "repository": {
    "type": "git",
    "url": "https://idontknow/todo.git"
  }
}
26 Likes